René Scharfe wrote:

> --- a/archive-tar.c
> +++ b/archive-tar.c
> @@ -153,6 +153,8 @@ static unsigned int ustar_header_chksum(const struct 
> ustar_header *header)
>  static size_t get_path_prefix(const char *path, size_t pathlen, size_t 
> maxlen)
>  {
>       size_t i = pathlen;
> +     if (i > 1 && path[i - 1] == '/')
> +             i--;

Beautiful.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to