X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/ad4789651e6fa6129c287af08a033014a38f2e78ecf450ffdf9f8197b7cc0139..3bb60c6d977266913201a89354ff788db7c5039dc0a6226899aeab874796cf3a:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 28748c8..843b0b5 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2830,6 +2830,7 @@ sub git_get_project_url_list { sub git_get_projects_list { my $filter = shift || ''; + my $paranoid = shift; my @list; if (-d $projects_list) { @@ -2840,7 +2841,7 @@ sub git_get_projects_list { my $pfxlen = length("$dir"); my $pfxdepth = ($dir =~ tr!/!!); # when filtering, search only given subdirectory - if ($filter) { + if ($filter && !$paranoid) { $dir .= "/$filter"; $dir =~ s!/+$!!; } @@ -2865,6 +2866,10 @@ sub git_get_projects_list { } my $path = substr($File::Find::name, $pfxlen + 1); + # paranoidly only filter here + if ($paranoid && $filter && $path !~ m!^\Q$filter\E/!) { + next; + } # we check related file in $projectroot if (check_export_ok("$projectroot/$path")) { push @list, { path => $path };