From: Jakub Narebski Date: Fri, 03 Nov 2006 11:18:00 GMT Subject: Re: [PATCH] gitweb: Remove extra "/" in path names for git_get_project_list Message-ID: In-Reply-To: <7vslh1jcji.fsf@assigned-by-dhcp.cox.net> Junio C Hamano wrote: > "Aneesh Kumar K.V" writes: > >> 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 > > Hmph. Doesn't this break $projects_list = "/", I wonder? > >> + # remove the trailing "/" >> + $dir =~ s!/+$!!; So perhaps $dir =~ s!(?<=[^/])/+$!!; (zero-width positive look-behind assertion). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git