X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=16a6970a58f618c1c16aeb0c5ccd2d6b0757134c;hb=2d34da98d52db1a915c10376b0405d7219e297c0;hp=baee9e88b493d23993e5e44194e1737e682517fd;hpb=6e631336919212a2ced12ec201918880370edf93;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index baee9e8..16a6970 100644 --- a/src/list.c +++ b/src/list.c @@ -222,7 +222,7 @@ list_archive (void) set_next_block_after (current_header); if (multi_volume_option) { - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, current_stat_info.orig_file_name); save_totsize = current_stat_info.stat.st_size; } for (size = current_stat_info.stat.st_size; size > 0; size -= written) @@ -258,7 +258,7 @@ list_archive (void) } if (multi_volume_option) - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, current_stat_info.orig_file_name); skip_member (); @@ -1098,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 @@ -1121,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 @@ -1305,7 +1309,7 @@ skip_member (void) char save_typeflag = current_header->header.typeflag; set_next_block_after (current_header); - assign_string (&save_name, current_stat_info.file_name); + assign_string (&save_name, current_stat_info.orig_file_name); if (current_stat_info.is_sparse) sparse_skip_file (¤t_stat_info);