Re: [PATCH] gitweb: accept trailing "/" in $project_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:

> The current code is removing the trailing "/", but computing the string
> length on the previous value, i.e. with the trailing "/". Later in the
> code, we do
>
>   my $path = substr($File::Find::name, $pfxlen + 1);
>
> And the "$pfxlen + 1" is supposed to mean "the length of the prefix, plus
> 1 for the / separating the prefix and the path", but with an incorrect
> $pfxlen, this basically eats the first character of the path, and yields
> "404 - No projects found".
>
> While we're there, also fix $pfxdepth to use $dir, although a change of 1
> in the depth shouldn't really matter.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx>
> ---
> I'm not fluent in Perl, and not familiar at all with gitweb, but this
> sounds a rather obvious (too obvious?) fix.

Yeah, probably not many people use $project_maxdepth with a meaningful
value.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]