From: Sergey Poznyakoff Date: Wed, 28 Sep 2005 20:41:38 +0000 (+0000) Subject: (print_header): If show_stored_names_option is given, X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=15b75f848ef060409047e76c88f98e985e35f02e;p=chaz%2Ftar (print_header): If show_stored_names_option is given, list member names as stored in the archive. Patch proposed by Erik Cumps --- 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) {