Thanks, but unfortunately that patch seems to conflict with the POSIX standard
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06>,
which says:

> A new pathname shall be formed, if prefix is not an empty string (its first 
> character is not NUL),
> by concatenating prefix (up to the first NUL character), a <slash> character, 
> and name;
> otherwise, name is used alone.

So a slash is required if the name field is empty.

But rather than worry too much about the standard, the main question is:
why is this change needed?  Ordinary 'tar' never produces such a header,
as the header contradicts itself: it claims to be a non-directory, but its file
name ends with "/".  If this never happens (except when tar files are
corrupted), why does it matter whether GNU tar treats the file as a
directory or as some other file type?

Reply via email to