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 <hcb@unco.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hielke Christian Braun committed
Jul 18, 2017 at 10:41 UTC
46a13857fc036b54ac2ddd0a218e5cc171aa7bd9
1 file changed
+2
gitweb/gitweb.perl
+2
@@ -3071,6 +3071,8 @@ sub git_get_projects_list {
3071
return if (m!^[/.]$!);
3072
# only directories can be git repositories
3073
return unless (-d $_);
3074
+ # need search permission
3075
+ return unless (-x $_);
3076
# don't traverse too deep (Find is super slow on os x)
3077
# $project_maxdepth excludes depth of $projectroot
3078
if (($File::Find::name =~ tr!/!!) - $pfxdepth > $project_maxdepth) {