gitweb: Remove extra "/" in path names for git_get_project_list
Quoted 6 lines · Junio C Hamano
Quoted 4 lines · Aneesh Kumar K.V
Without this change we get a wrong $pfxlen value and the
check_export_ok()checks with with a wrong directory name. Without this patch the below $projects_list fails with gitweb
Quoted 8 lines
Quoted 3 lines
$projects_list = "
/tmp/a/b/";Signed-off-by Aneesh Kumar K.V <[email protected]>Hmph. Doesn't this break $projects_list = "/", I wonder?
Quoted 2 lines
gitweb/gitweb.perl +2
-0+ # remove the trailing "/" + $dir =~ s!/+$!!;
So perhaps
$dir =~ s!(?<=[^/])/+$!!;
(zero-width positive look-behind assertion).
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git
Quoted 7 lines · Aneesh Kumar K.V
Without this change we get a wrong $pfxlen value and the
check_export_ok()checks with with a wrong directory name. Without this patch the below $projects_list fails with gitweb$projects_list = "
/tmp/a/b/";Signed-off-by Aneesh Kumar K.V <[email protected]>
Hmph. Doesn't this break $projects_list = "/", I wonder?
Quoted 2 lines
gitweb/gitweb.perl +2
-0+ # remove the trailing "/" + $dir =~ s!/+$!!;
PATCH 1/1 gitweb: Remove extra "/" in path names for git_get_project_list
Without this change we get a wrong $pfxlen value and the check_export_ok() checks with with a wrong directory name. Without this patch the below $projects_list fails with gitweb
$projects_list = "/tmp/a/b/";
--- gitweb/gitweb.perl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
gitweb/gitweb.perl +2 -0
@@ -897,6 +897,8 @@ sub git_get_projects_list { if (-d $projects_list) { # search in directory my $dir = $projects_list; + # remove the trailing "/" + $dir =~ s!/+$!!; my $pfxlen = length("$dir"); File::Find::find({
Signature · 1 line
1.4.3.3.gc954-dirty