]> Dogcows Code - chaz/tar/blobdiff - src/list.c
When computing write rate do not take
[chaz/tar] / src / list.c
index cb207a982b9633eec275daf8ca8fa287139f3002..06ccf2d8465dce24152c20d6bc4bbcf8db433a49 100644 (file)
@@ -118,6 +118,8 @@ read_and (void (*do_something) (void))
                           quotearg_colon (current_stat_info.file_name)));
                  /* Fall through.  */
                default:
+                 decode_header (current_header,
+                                &current_stat_info, &current_format, 0);
                  skip_member ();
                  continue;
                }
@@ -1237,6 +1239,19 @@ skip_file (off_t size)
       save_sizeleft = size;
     }
 
+  if (seekable_archive)
+    {
+      off_t nblk = seek_archive (size);
+      if (nblk >= 0)
+       {
+         size -= nblk * BLOCKSIZE;
+         if (multi_volume_option) /* Argh.. */
+           save_sizeleft -= nblk * BLOCKSIZE;
+       }
+      else
+       seekable_archive = false;
+    }
+  
   while (size > 0)
     {
       x = find_next_block ();
@@ -1250,16 +1265,17 @@ skip_file (off_t size)
     }
 }
 
-/* Skip the current member in the archive.  */
+/* Skip the current member in the archive.
+   NOTE: Current header must be decoded before calling this function. */
 void
 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);
 
-  if (sparse_member_p (&current_stat_info))
+  if (current_stat_info.is_sparse)
     sparse_skip_file (&current_stat_info);
   else if (save_typeflag != DIRTYPE)
     skip_file (current_stat_info.stat.st_size);
This page took 0.024172 seconds and 4 git commands to generate.