1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-21 19:46:09 +02:00

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>
This commit is contained in:
Hielke Christian Braun 2017-07-18 10:41:54 +02:00 committed by Junio C Hamano
parent 08f9c32463
commit 46a13857fc

View File

@ -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) {