X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbuffer.c;h=59d4e4f0c16c4c793f1d97e6fb3c67923fbd1150;hb=5354888e400e0565e85ac29e4826c0f7840cab45;hp=c544ee00d85b5b9a862035dadbce8636f57f52c5;hpb=1d79c6734cfbd302e53358760b4c3fe3e7b9be61;p=chaz%2Ftar diff --git a/src/buffer.c b/src/buffer.c index c544ee0..59d4e4f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -686,6 +686,18 @@ short_read (size_t status) more = record_start->buffer + status; left = record_size - status; + if (left && left % BLOCKSIZE == 0 + && verbose_option + && record_start_block == 0 && status != 0) + { + unsigned long rsize = status / BLOCKSIZE; + WARN ((0, 0, + ngettext ("Record size = %lu block", + "Record size = %lu blocks", + rsize), + rsize)); + } + while (left % BLOCKSIZE != 0 || (left && status && read_full_records)) { @@ -707,26 +719,10 @@ short_read (size_t status) rest)); } - /* User warned us about this. Fix up. */ - left -= status; more += status; } - /* FIXME: for size=0, multi-volume support. On the first record, warn - about the problem. */ - - if (!read_full_records && verbose_option > 1 - && record_start_block == 0 && status != 0) - { - unsigned long rsize = (record_size - left) / BLOCKSIZE; - WARN ((0, 0, - ngettext ("Record size = %lu block", - "Record size = %lu blocks", - rsize), - rsize)); - } - record_end = record_start + (record_size - left) / BLOCKSIZE; records_read++; } @@ -1571,6 +1567,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)