@matheusbsbs / matheus-bagliano / commits / 6768d6b847
Fork 0

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 <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Aneesh Kumar K.V committed Nov 3, 2006 at 10:41 UTC 6768d6b8477db41a1cfdbd1d81ac8c5131c58e1d
1 file changed +2
gitweb/gitweb.perl
+2
@@ -902,6 +902,8 @@ sub git_get_projects_list {
902 if (-d $projects_list) {
903 # search in directory
904 my $dir = $projects_list;
905 + # remove the trailing "/"
906 + $dir =~ s!/+$!!;
907 my $pfxlen = length("$dir");
908
909 File::Find::find({