diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2007-04-07 03:37:59 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2007-04-07 03:37:59 +0000 |
| commit | e95f7ff4ee7125e5605821d697ded71462b47400 (patch) | |
| tree | 7be90b2ddf87a9a0d70c9f3e273c914dd2546296 /lib/libarchive/archive_read_extract.c | |
| parent | 59513fc4eec6070b9b0190ea75de45d881778a47 (diff) | |
Notes
Diffstat (limited to 'lib/libarchive/archive_read_extract.c')
| -rw-r--r-- | lib/libarchive/archive_read_extract.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index 4285d13f33f8..c4189f0a88e6 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/libarchive/archive_read_extract.c @@ -98,10 +98,6 @@ archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags) if (r == ARCHIVE_OK) /* If there's an FD, pour data into it. */ r = copy_data(_a, a->extract->ad); - if (r != ARCHIVE_OK) - archive_set_error(&a->archive, - archive_errno(extract->ad), - "%s", archive_error_string(extract->ad)); r2 = archive_write_finish_entry(a->extract->ad); /* Use the first message. */ if (r2 != ARCHIVE_OK && r == ARCHIVE_OK) @@ -141,8 +137,11 @@ copy_data(struct archive *ar, struct archive *aw) if (r != ARCHIVE_OK) return (r); r = archive_write_data_block(aw, buff, size, offset); - if (r != ARCHIVE_OK) + if (r != ARCHIVE_OK) { + archive_set_error(ar, archive_errno(aw), + "%s", archive_error_string(aw)); return (r); + } } } |
