Browse Source

(extract_archive): Check reported size vs.
archive file size to determine if we have to do with a
sparse file.

Sergey Poznyakoff 21 năm trước cách đây
mục cha
commit
47e73c7a44
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/extract.c

+ 4 - 0
src/extract.c

@@ -601,6 +601,10 @@ extract_archive (void)
   /* Extract the archive entry according to its type.  */
 
   typeflag = current_header->header.typeflag;
+  /*KLUDGE*/
+  if (current_stat_info.archive_file_size != current_stat_info.stat.st_size)
+    typeflag = GNUTYPE_SPARSE;
+  
   switch (typeflag)
     {
     case GNUTYPE_SPARSE: