Skip to content

Commit 46a1385

Browse files
hcbraungitster
authored andcommitted
gitweb: skip unreadable subdirectories
gitweb terminates and shows no project list, if it can not access a sub-directory in the project root directory while looking for projects to show. Work it around by skipping unreadable directories. Signed-off-by: Hielke Christian Braun <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 08f9c32 commit 46a1385

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)