summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-07-25 18:11:55 +0000
committerkientzle <kientzle@FreeBSD.org>2009-07-25 18:11:55 +0000
commita8dfa34a4d0ddc663af25c6c3f87448f51764ef4 (patch)
treedf425b4a9537bf727dde9c93e985b0c6971fac0d /lib/libarchive
parenta6639bed1e8b4939981a0bd3096d2c9fcedbcb26 (diff)
downloadFreeBSD-src-a8dfa34a4d0ddc663af25c6c3f87448f51764ef4.zip
FreeBSD-src-a8dfa34a4d0ddc663af25c6c3f87448f51764ef4.tar.gz
Libarchive recognizes hardlinked files on ISO images,
but returned them incorrectly, causing tar to actually erase the resulting file while trying to restore the link. This one-line fix corrects the hardlink descriptions to avoid this problem. Thanks to Jung-uk Kim for pointing this out. Approved by: re (kib)
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_read_support_format_iso9660.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_format_iso9660.c b/lib/libarchive/archive_read_support_format_iso9660.c
index eabdd8b..0ab5cae 100644
--- a/lib/libarchive/archive_read_support_format_iso9660.c
+++ b/lib/libarchive/archive_read_support_format_iso9660.c
@@ -579,6 +579,7 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
&& file->size > 0) {
archive_entry_set_hardlink(entry,
iso9660->previous_pathname.s);
+ archive_entry_unset_size(entry);
iso9660->entry_bytes_remaining = 0;
iso9660->entry_sparse_offset = 0;
release_file(iso9660, file);
OpenPOWER on IntegriCloud