X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fsparse.c;h=0955248c492a9e75cb767edd81d17693cfde9bb0;hb=2e9ea5f4a775e25267ff6892f98f491c7f4a21cd;hp=d3f716492b894cd0134711e2de3b8b540d0f1550;hpb=37d2462d7c5da33a2bdfd4f12e8f2e047837f72e;p=chaz%2Ftar diff --git a/src/sparse.c b/src/sparse.c index d3f7164..0955248 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -217,6 +217,8 @@ sparse_scan_file (struct tar_sparse_file *file) if (!lseek_or_error (file, 0)) return false; + st->archive_file_size = 0; + if (!tar_sparse_scan (file, scan_begin, NULL)) return false; @@ -843,7 +845,7 @@ static struct tar_sparse_optab const star_optab = { static bool pax_sparse_member_p (struct tar_sparse_file *file) { - return file->stat_info->archive_file_size != file->stat_info->stat.st_size; + return file->stat_info->sparse_map_avail > 0; } static bool