From: uid65697 Date: Thu, 25 Dec 2003 10:19:24 +0000 (+0000) Subject: (read_and): Treat only two successive zero filled blocks as an EOF indicator. Issue... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=67a6a93b2f9dc0a4f8319409a0a49aa870278592;p=chaz%2Ftar (read_and): Treat only two successive zero filled blocks as an EOF indicator. Issue a warning if a single one is encountered. --- diff --git a/src/list.c b/src/list.c index 77dce55..b8a1b17 100644 --- a/src/list.c +++ b/src/list.c @@ -130,10 +130,19 @@ read_and (void (*do_something) (void)) } set_next_block_after (current_header); + + if (!ignore_zeros_option) + { + char buf[UINTMAX_STRSIZE_BOUND]; + + status = read_header (false); + if (status == HEADER_ZERO_BLOCK) + break; + WARN ((0, 0, _("A lone zero block at %s"), + STRINGIFY_BIGINT (current_block_ordinal (), buf))); + } status = prev_status; - if (ignore_zeros_option) - continue; - break; + continue; case HEADER_END_OF_FILE: if (block_number_option)