X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fsparse.c;h=0955248c492a9e75cb767edd81d17693cfde9bb0;hb=f319c5575b7b98776a778e00b009f17e9814a71c;hp=ecbbe108842bbd27366b3d16a470fc4e047a474e;hpb=040b5ab5f969f9ee6c69a54bc284e2ff57b86556;p=chaz%2Ftar diff --git a/src/sparse.c b/src/sparse.c index ecbbe10..0955248 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -102,6 +102,7 @@ tar_sparse_member_p (struct tar_sparse_file *file) static bool tar_sparse_init (struct tar_sparse_file *file) { + file->dumped_size = 0; if (file->optab->init) return file->optab->init (file); return true; @@ -216,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; @@ -842,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