From: Paul Eggert Date: Sat, 28 Oct 2000 05:54:42 +0000 (+0000) Subject: (flush_read): If read_full_records_option, try to fill the input buffer, X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=7abb9b854d201c076e6056b920229c9a5ea67e5c;p=chaz%2Ftar (flush_read): If read_full_records_option, try to fill the input buffer, as --delete -f - needs this. --- diff --git a/src/buffer.c b/src/buffer.c index 73e4344..0dcea17 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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; }