]> Dogcows Code - chaz/tar/commitdiff
(decode_header): Discern between pax and ustar formats
authoruid65697 <uid65697>
Thu, 25 Dec 2003 10:19:00 +0000 (10:19 +0000)
committeruid65697 <uid65697>
Thu, 25 Dec 2003 10:19:00 +0000 (10:19 +0000)
src/list.c

index 0c8095e4d991dcd426c221c52eba8c2a72e8f769..cb14c79bb8ee01240844e0931185e916f9d4903d 100644 (file)
@@ -489,8 +489,10 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
          && ISOCTAL (header->star_header.ctime[0])
          && header->star_header.ctime[11] == ' ')
        format = STAR_FORMAT;
-      else
+      else if (extended_header.size)
        format = POSIX_FORMAT;
+      else
+       format = USTAR_FORMAT;
     }
   else if (strcmp (header->header.magic, OLDGNU_MAGIC) == 0)
     format = OLDGNU_FORMAT;
@@ -556,6 +558,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);
 }
This page took 0.023476 seconds and 4 git commands to generate.