From: Junio C Hamano Date: Wed, 23 Aug 2017 21:33:44 +0000 (-0700) Subject: Merge branch 'hb/gitweb-project-list' into maint X-Git-Tag: v2.14.2~57 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b9e56be086ffa4f8431082a6fb25225e79e5bbc8?ds=inline;hp=-c Merge branch 'hb/gitweb-project-list' into maint When a directory is not readable, "gitweb" fails to build the project list. Work this around by skipping such a directory. It might end up hiding a problem under the rug and a better solution might be to loudly complain to the administrator pointing out the problematic directory, but this will at least make it "work". * hb/gitweb-project-list: gitweb: skip unreadable subdirectories --- b9e56be086ffa4f8431082a6fb25225e79e5bbc8 diff --combined gitweb/gitweb.perl index 3d4a8ee27c,8318411b91..9208f42ed1 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@@ -3071,6 -3071,8 +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) { @@@ -3125,7 -3127,7 +3127,7 @@@ return @list; } -# written with help of Tree::Trie module (Perl Artistic License, GPL compatibile) +# written with help of Tree::Trie module (Perl Artistic License, GPL compatible) # as side effects it sets 'forks' field to list of forks for forked projects sub filter_forks_from_projects_list { my $projects = shift; @@@ -4376,7 -4378,7 +4378,7 @@@ sub git_print_page_nav "\n"; } -# returns a submenu for the nagivation of the refs views (tags, heads, +# returns a submenu for the navigation of the refs views (tags, heads, # remotes) with the current view disabled and the remotes view only # available if the feature is enabled sub format_ref_views {