X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=fdc8fa9975b14cb7b81e4d0e72fa9323f4076d18;hb=7eeb467132fbc37dff8a008c33f4e277291a4609;hp=77dce5507215fc6875c0de0e047045bc362f85d3;hpb=50b2227279c0094f4ed42c747c501c9dc8115526;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index 77dce55..fdc8fa9 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) @@ -559,8 +568,7 @@ decode_header (union block *header, struct tar_stat_info *stat_info, } current_stat_info.archive_file_size = current_stat_info.stat.st_size; - if (extended_header.size) - xheader_decode (stat_info); + xheader_decode (stat_info); } /* Convert buffer at WHERE0 of size DIGS from external format to