]> Dogcows Code - chaz/tar/blobdiff - src/buffer.c
Include fnmatch.h.
[chaz/tar] / 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.019488 seconds and 4 git commands to generate.