]> Dogcows Code - chaz/tar/commitdiff
(flush_read): If read_full_records_option, try to fill the input buffer,
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 28 Oct 2000 05:54:42 +0000 (05:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 28 Oct 2000 05:54:42 +0000 (05:54 +0000)
as --delete -f - needs this.

src/buffer.c

index 73e434499f4f65eba9aace9788e7a6b4e3c4eb6e..0dcea17db794d6117b90d45bdf27588c4a70557a 100644 (file)
@@ -1198,7 +1198,8 @@ flush_read (void)
   more = record_start->buffer + status;
   left = record_size - status;
 
-  while (left % BLOCKSIZE != 0)
+  while (left % BLOCKSIZE != 0
+        || (left && status && read_full_records_option))
     {
       if (status)
        while ((status = rmtread (archive, more, left)) < 0)
@@ -1206,8 +1207,9 @@ flush_read (void)
 
       if (status == 0)
        {
-         ERROR ((0, 0, _("%d garbage bytes ignored at end of archive"),
-                 (int) ((record_size - left) % BLOCKSIZE)));
+         if (left % BLOCKSIZE != 0)
+           ERROR ((0, 0, _("%d garbage bytes ignored at end of archive"),
+                   (int) ((record_size - left) % BLOCKSIZE)));
          break;
        }
 
This page took 0.027176 seconds and 4 git commands to generate.