From: Sergey Poznyakoff Date: Mon, 9 Aug 2004 11:24:06 +0000 (+0000) Subject: (read_and): Call decode_header before calling skip_member() X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=260acce7a344434705e7137b465bcc75e65fde61;p=chaz%2Ftar (read_and): Call decode_header before calling skip_member() (skip_member): Use is_sparse field to determine if the member is a sparse file. --- diff --git a/src/list.c b/src/list.c index 3166e68..06ccf2d 100644 --- a/src/list.c +++ b/src/list.c @@ -118,6 +118,8 @@ read_and (void (*do_something) (void)) quotearg_colon (current_stat_info.file_name))); /* Fall through. */ default: + decode_header (current_header, + ¤t_stat_info, ¤t_format, 0); skip_member (); continue; } @@ -1263,16 +1265,17 @@ skip_file (off_t size) } } -/* Skip the current member in the archive. */ +/* Skip the current member in the archive. + NOTE: Current header must be decoded before calling this function. */ void skip_member (void) { char save_typeflag = current_header->header.typeflag; set_next_block_after (current_header); - + assign_string (&save_name, current_stat_info.file_name); - if (sparse_member_p (¤t_stat_info)) + if (current_stat_info.is_sparse) sparse_skip_file (¤t_stat_info); else if (save_typeflag != DIRTYPE) skip_file (current_stat_info.stat.st_size);