Do not wrap skip_member in mv_begin/mv_end, the function itself
takes care of it.
(decode_header): Set stat_info->is_dumpdir
(skip_member): Do nothing if skipped is true
{
if (verbose_option > 2)
{
{
if (verbose_option > 2)
{
- if (current_stat_info.dumpdir)
+ if (is_dumpdir (¤t_stat_info))
list_dumpdir (current_stat_info.dumpdir,
dumpdir_size (current_stat_info.dumpdir));
}
}
list_dumpdir (current_stat_info.dumpdir,
dumpdir_size (current_stat_info.dumpdir));
}
}
- mv_begin (¤t_stat_info);
-
}
/* Check header checksum */
}
/* Check header checksum */
else
{
stat_info->is_sparse = false;
else
{
stat_info->is_sparse = false;
- if ((current_format == GNU_FORMAT
- || current_format == OLDGNU_FORMAT)
- && current_header->header.typeflag == GNUTYPE_DUMPDIR)
- get_gnu_dumpdir ();
+ if (((current_format == GNU_FORMAT
+ || current_format == OLDGNU_FORMAT)
+ && current_header->header.typeflag == GNUTYPE_DUMPDIR)
+ || stat_info->dumpdir)
+ stat_info->is_dumpdir = true;
void
skip_member (void)
{
void
skip_member (void)
{
- char save_typeflag = current_header->header.typeflag;
- set_next_block_after (current_header);
+ if (!current_stat_info.skipped)
+ {
+ char save_typeflag = current_header->header.typeflag;
+ set_next_block_after (current_header);
- mv_begin (¤t_stat_info);
+ mv_begin (¤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);
+ 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);