X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=667607d7a196a563426254d3afcbe4762a2b7eb1;hb=36f1d689e4556012105065c3e73e668f466881ba;hp=d8591634380ed81e62264a16ad07f7612c9ccf9a;hpb=3209329337c87a102fa12d7eb60a3df323ba56c1;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index d859163..667607d 100644 --- a/src/list.c +++ b/src/list.c @@ -210,7 +210,7 @@ list_archive (void) decode_header (current_header, ¤t_stat_info, ¤t_format, 0); if (verbose_option) print_header (¤t_stat_info, -1); - + if (incremental_option && current_header->header.typeflag == GNUTYPE_DUMPDIR) { off_t size; @@ -1009,6 +1009,27 @@ print_header (struct tar_stat_info *st, off_t block_ordinal) int pad; int sizelen; + if (test_label_option && current_header->header.typeflag != GNUTYPE_VOLHDR) + return; + + if (show_stored_names_option) + { + switch (subcommand_option) + { + case CAT_SUBCOMMAND: + case UPDATE_SUBCOMMAND: + case APPEND_SUBCOMMAND: + case CREATE_SUBCOMMAND: + temp_name = st->file_name ? st->file_name : st->orig_file_name; + break; + + default: + temp_name = st->orig_file_name ? st->orig_file_name : st->file_name; + } + } + else + temp_name = st->orig_file_name ? st->orig_file_name : st->file_name; + if (block_number_option) { char buf[UINTMAX_STRSIZE_BOUND];