Thanks to Colin for catching my mixup. The original problem wasn't
suppressing the second error, it was failing to address the first.
This commit is contained in:
parent
f912fb118f
commit
edddd60899
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168744
@ -95,12 +95,17 @@ archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags)
|
||||
archive_write_disk_set_skip_file(a->extract->ad,
|
||||
a->skip_file_dev, a->skip_file_ino);
|
||||
r = archive_write_header(a->extract->ad, entry);
|
||||
if (r == ARCHIVE_OK)
|
||||
/* If there's an FD, pour data into it. */
|
||||
if (r != ARCHIVE_OK)
|
||||
/* If _write_header failed, copy the error. */
|
||||
archive_set_error(&a->archive,
|
||||
archive_errno(extract->ad),
|
||||
"%s", archive_error_string(extract->ad));
|
||||
else
|
||||
/* Otherwise, pour data into the entry. */
|
||||
r = copy_data(_a, a->extract->ad);
|
||||
r2 = archive_write_finish_entry(a->extract->ad);
|
||||
/* Use the first message. */
|
||||
if (r2 != ARCHIVE_OK || r != ARCHIVE_OK)
|
||||
if (r2 != ARCHIVE_OK && r == ARCHIVE_OK)
|
||||
archive_set_error(&a->archive,
|
||||
archive_errno(extract->ad),
|
||||
"%s", archive_error_string(extract->ad));
|
||||
|
Loading…
Reference in New Issue
Block a user