From: uid65697 Date: Thu, 25 Dec 2003 10:19:00 +0000 (+0000) Subject: (decode_header): Discern between pax and ustar formats X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=defde325338f14d5a25d113141e8e03d19a7fbe8;p=chaz%2Ftar (decode_header): Discern between pax and ustar formats --- diff --git a/src/list.c b/src/list.c index 0c8095e..cb14c79 100644 --- a/src/list.c +++ b/src/list.c @@ -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); }