From: Aneesh Kumar K.V Date: Fri, 3 Nov 2006 05:11:45 +0000 (+0530) Subject: gitweb: Remove extra "/" in path names for git_get_project_list X-Git-Tag: v1.4.4-rc1~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6768d6b8477db41a1cfdbd1d81ac8c5131c58e1d;p=git.git 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/"; Signed-off-by: Aneesh Kumar K.V Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 3dfa59f61..3759be37b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -902,6 +902,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({