]> Dogcows Code - chaz/tar/commitdiff
(print_header): If show_stored_names_option is given,
authorSergey Poznyakoff <gray@gnu.org.ua>
Wed, 28 Sep 2005 20:41:38 +0000 (20:41 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Wed, 28 Sep 2005 20:41:38 +0000 (20:41 +0000)
list member names as stored in the archive. Patch proposed by Erik
Cumps <erik.cumps@icos.be>

src/list.c

index af210cf8f48659ed9fbd1dff91582ec870379599..667607d7a196a563426254d3afcbe4762a2b7eb1 100644 (file)
@@ -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)
     {
This page took 0.031808 seconds and 4 git commands to generate.