X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcompare.c;h=f3723049ed055b3b4ef7d96c5d5c23914b0ab9d8;hb=7efe3850f6e058d33a46ef17cdc95df0469ed887;hp=d0cf5f7d6c04963bc96928ab0c975b32d87b7af3;hpb=d0694ee604861ec09fa53cc8ffb50d01f440345c;p=chaz%2Ftar diff --git a/src/compare.c b/src/compare.c index d0cf5f7..f372304 100644 --- a/src/compare.c +++ b/src/compare.c @@ -597,9 +597,23 @@ verify_volume (void) "VERIFY FAILURE: %d invalid headers detected", counter), counter)); } - if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE) + if (status == HEADER_END_OF_FILE) break; + if (status == HEADER_ZERO_BLOCK) + { + 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))); + } + } + diff_archive (); tar_stat_destroy (¤t_stat_info); }