Browse Source

Merge branch 'hb/gitweb-project-list'

When a directory is not readable, "gitweb" fails to build the
project list.  Work this around by skipping such a directory.

* hb/gitweb-project-list:
  gitweb: skip unreadable subdirectories
maint
Junio C Hamano 8 years ago
parent
commit
a6ca9ee9e0
  1. 2
      gitweb/gitweb.perl

2
gitweb/gitweb.perl

@ -3071,6 +3071,8 @@ sub git_get_projects_list { @@ -3071,6 +3071,8 @@ sub git_get_projects_list {
return if (m!^[/.]$!);
# only directories can be git repositories
return unless (-d $_);
# need search permission
return unless (-x $_);
# don't traverse too deep (Find is super slow on os x)
# $project_maxdepth excludes depth of $projectroot
if (($File::Find::name =~ tr!/!!) - $pfxdepth > $project_maxdepth) {

Loading…
Cancel
Save