summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorHielke Christian Braun <hcb@unco.de>2017-07-18 08:41:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-18 19:10:17 (GMT)
commit46a13857fc036b54ac2ddd0a218e5cc171aa7bd9 (patch)
treed7eaf440952bacf1c1f5fbfb78647e2acadd2f93 /gitweb
parent08f9c32463bf9e578acb7ac5f77afd36e803c6bc (diff)
downloadgit-46a13857fc036b54ac2ddd0a218e5cc171aa7bd9.zip
git-46a13857fc036b54ac2ddd0a218e5cc171aa7bd9.tar.gz
git-46a13857fc036b54ac2ddd0a218e5cc171aa7bd9.tar.bz2
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 2 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d8209c7..8318411 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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) {