X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=0657fcff036492fd4f9367de5303e9e2b0dccc12;hb=2872a5ae81252fde90795b914b6088485abd7ab0;hp=e0f5080876c623e25e11f945c4b06c606be2b0c0;hpb=8f0112cb2365f4635895014debbf9355f6b54ecf;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index e0f5080..0657fcf 100644 --- a/src/list.c +++ b/src/list.c @@ -465,11 +465,6 @@ read_header (bool raw_extended_headers) np[sizeof h->prefix] = '\0'; np += strlen (np); *np++ = '/'; - - /* Prevent later references to current_header from - mistakenly treating this as an old GNU header. - This assignment invalidates h->prefix. */ - current_header->oldgnu_header.isextended = 0; } memcpy (np, h->name, sizeof h->name); np[sizeof h->name] = '\0'; @@ -1103,7 +1098,9 @@ print_header (struct tar_stat_info *st, off_t block_ordinal) /* User and group names. */ - if (st->uname && current_format != V7_FORMAT + if (st->uname + && st->uname[0] + && current_format != V7_FORMAT && !numeric_owner_option) user = st->uname; else @@ -1126,7 +1123,9 @@ print_header (struct tar_stat_info *st, off_t block_ordinal) } } - if (st->gname && current_format != V7_FORMAT + if (st->gname + && st->gname[0] + && current_format != V7_FORMAT && !numeric_owner_option) group = st->gname; else