Import additional bugfix for reading and extracting makefs-created
ISO images with tar. Vendor revision 3648 (merge of 3647): Additional fix to issue 168 because the change of r3642 was not sufficient. - Make sure "CL" entry appear after its "RE" entry which the "CL" entry should be connected with. - Give consideration to the case that the top level "RE" entry has already been exposed outside before its tree. Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3648) MFC after: 3 days
This commit is contained in:
parent
f68ebb0eec
commit
2c862d88e8
@ -1815,8 +1815,11 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
|
|||||||
file->re_descendant = 1;
|
file->re_descendant = 1;
|
||||||
if (file->cl_offset != 0) {
|
if (file->cl_offset != 0) {
|
||||||
parent->subdirs++;
|
parent->subdirs++;
|
||||||
/* To be appeared before other dirs. */
|
/* Overwrite an offset and a number of this "CL" entry
|
||||||
file->offset = file->number = file->cl_offset;
|
* to appear before other dirs. "+1" to those is to
|
||||||
|
* make sure to appear after "RE" entry which this
|
||||||
|
* "CL" entry should be connected with. */
|
||||||
|
file->offset = file->number = file->cl_offset + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2581,13 +2584,16 @@ next_cache_entry(struct archive_read *a, struct iso9660 *iso9660,
|
|||||||
continue;
|
continue;
|
||||||
} else if (file->re_descendant) {
|
} else if (file->re_descendant) {
|
||||||
/*
|
/*
|
||||||
* Do not expose this at this time
|
* If the top level "RE" entry of this entry
|
||||||
* because we have not gotten its full-path
|
* is not exposed, we, accordingly, should not
|
||||||
* name yet.
|
* expose this entry at this time because
|
||||||
|
* we cannot make its proper full-path name.
|
||||||
*/
|
*/
|
||||||
if (rede_add_entry(file) < 0)
|
if (rede_add_entry(file) == 0)
|
||||||
goto fatal_rr;
|
continue;
|
||||||
continue;
|
/* Otherwise we can expose this entry because
|
||||||
|
* it seems its top level "RE" has already been
|
||||||
|
* exposed. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user