]> Dogcows Code - chaz/tar/commitdiff
(open_compressed_archive): Do not attemt to determine compression type if handling...
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 21 Dec 2004 15:10:56 +0000 (15:10 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 21 Dec 2004 15:10:56 +0000 (15:10 +0000)
src/buffer.c

index 5c6412fbf63ac63e2a8823f1026c10ebd6dabd9d..6390d7db401c0194b2443481cfa57e9df75f78e6 100644 (file)
@@ -216,28 +216,29 @@ check_compressed_archive ()
 int
 open_compressed_archive ()
 {
-  enum compress_type type;
-
   archive = rmtopen (archive_name_array[0], O_RDONLY | O_BINARY,
                     MODE_RW, rsh_command_option);
   if (archive == -1)
     return archive;
 
-  type = check_compressed_archive ();
+  if (!multi_volume_option) 
+    {
+      enum compress_type type = check_compressed_archive ();
   
-  if (type == ct_none)
-    return archive;
+      if (type == ct_none)
+       return archive;
 
-  /* FD is not needed any more */
-  rmtclose (archive);
+      /* FD is not needed any more */
+      rmtclose (archive);
 
-  hit_eof = false; /* It might have been set by find_next_block in
-                     check_compressed_archive */
+      hit_eof = false; /* It might have been set by find_next_block in
+                         check_compressed_archive */
 
-  /* Open compressed archive */
-  use_compress_program_option = compress_program (type);
-  child_pid = sys_child_open_for_uncompress ();
-  read_full_records = reading_from_pipe = true;
+      /* Open compressed archive */
+      use_compress_program_option = compress_program (type);
+      child_pid = sys_child_open_for_uncompress ();
+      read_full_records = reading_from_pipe = true;
+    }
   
   records_read = 0;
   record_end = record_start; /* set up for 1st record = # 0 */
This page took 0.024116 seconds and 4 git commands to generate.