]> Dogcows Code - chaz/tar/blobdiff - src/buffer.c
Do not try to drain the input pipe before closing the archive.
[chaz/tar] / src / buffer.c
index 79bb7d6f4d45a6e1b724cf1fa5382838ea84203f..5f5457a95571e531a027179b511fdb0c41763d69 100644 (file)
@@ -687,7 +687,7 @@ short_read (size_t status)
   left = record_size - status;
 
   if (left && left % BLOCKSIZE == 0
-      && !read_full_records && verbose_option > 1
+      && verbose_option
       && record_start_block == 0 && status != 0)
     {
       unsigned long rsize = status / BLOCKSIZE;
@@ -848,8 +848,6 @@ close_archive (void)
         flush_archive ();
     }
 
-  sys_drain_input_pipe ();
-
   compute_duration ();
   if (verify_option)
     verify_volume ();
@@ -857,7 +855,7 @@ close_archive (void)
   if (rmtclose (archive) != 0)
     close_error (*archive_name_cursor);
 
-  sys_wait_for_child (child_pid);
+  sys_wait_for_child (child_pid, hit_eof);
 
   tar_stat_destroy (&current_stat_info);
   if (save_name)
@@ -1320,7 +1318,7 @@ _write_volume_label (const char *str)
 
       memset (label, 0, BLOCKSIZE);
 
-      strcpy (label->header.name, volume_label_option);
+      strcpy (label->header.name, str);
       assign_string (&current_stat_info.file_name,
                      label->header.name);
       current_stat_info.had_trailing_slash =
@@ -1567,6 +1565,9 @@ _gnu_flush_read (void)
         {
           while (!try_new_volume ())
             ;
+         if (current_block == record_end)
+           /* Necessary for blocking_factor == 1 */
+           flush_archive();
           return;
         }
       else if (status == SAFE_READ_ERROR)
This page took 0.024106 seconds and 4 git commands to generate.