aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@gmail.com>2006-11-03 10:41:45 +0530
committerJunio C Hamano <junkio@cox.net>2006-11-04 01:51:35 -0800
commit6768d6b8477db41a1cfdbd1d81ac8c5131c58e1d (patch)
tree5b12d8d5ddf11abe42b8112c98781493156096f9 /gitweb
parent2379d61fa6355bc7a8cc8b5dce87a7d4a9505c76 (diff)
downloadgit-6768d6b8477db41a1cfdbd1d81ac8c5131c58e1d.tar.gz
git-6768d6b8477db41a1cfdbd1d81ac8c5131c58e1d.tar.xz
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 2 insertions, 0 deletions
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({