X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=667607d7a196a563426254d3afcbe4762a2b7eb1;hb=c641a16cba34ec0b0f1fb41dcdd7a27c9b760a83;hp=af210cf8f48659ed9fbd1dff91582ec870379599;hpb=8f1d2fd9c34120b010e9c25fe93d195eea83d8c6;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index af210cf..667607d 100644 --- a/src/list.c +++ b/src/list.c @@ -1011,6 +1011,24 @@ print_header (struct tar_stat_info *st, off_t block_ordinal) 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) {