]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: skip unreadable subdirectories
authorHielke Christian Braun <redacted>
Tue, 18 Jul 2017 08:41:54 +0000 (10:41 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:33 +0000 (00:51 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 6f5ee84d0b820209a4788278f4fe559d1bbc6350eaca4a29a8822aeffa8ad610..d188fafd805bb91bcb6967c345ad24df6b21f6ade3384d0874c3e2179460f5c2 100755 (executable)
@@ -3072,6 +3072,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) {
This page took 0.270557 seconds and 4 git commands to generate.