Merge branch 'rs/leave-base-name-in-name-field-of-tar' into maint
A tar archive created by "git archive" recorded a directory in a way that made NetBSD's implementation of "tar" sometimes unhappy. * rs/leave-base-name-in-name-field-of-tar: archive-tar: split long paths more carefully
This commit is contained in:
commit
f0c103b49c
@ -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--;
|
||||
if (i > maxlen)
|
||||
i = maxlen;
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user