Skip to content

Commit b9e56be

Browse files
committed
Merge branch 'hb/gitweb-project-list' into maint
When a directory is not readable, "gitweb" fails to build the project list. Work this around by skipping such a directory. It might end up hiding a problem under the rug and a better solution might be to loudly complain to the administrator pointing out the problematic directory, but this will at least make it "work". * hb/gitweb-project-list: gitweb: skip unreadable subdirectories
2 parents 01ced48 + 46a1385 commit b9e56be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,8 @@ sub git_get_projects_list {
30713071
return if (m!^[/.]$!);
30723072
# only directories can be git repositories
30733073
return unless (-d $_);
3074+
# need search permission
3075+
return unless (-x $_);
30743076
# don't traverse too deep (Find is super slow on os x)
30753077
# $project_maxdepth excludes depth of $projectroot
30763078
if (($File::Find::name =~ tr!/!!) - $pfxdepth > $project_maxdepth) {

0 commit comments

Comments
 (0)