]> Dogcows Code - chaz/tar/blobdiff - src/sparse.c
(pax_sparse_member_p): Checking member size vs. file size is not reliable enough...
[chaz/tar] / src / sparse.c
index d3f716492b894cd0134711e2de3b8b540d0f1550..0955248c492a9e75cb767edd81d17693cfde9bb0 100644 (file)
@@ -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
This page took 0.020132 seconds and 4 git commands to generate.