Pass through error message if any operation fails, not just the last one.

This commit is contained in:
Tim Kientzle 2007-04-14 22:49:37 +00:00
parent 37320c7575
commit b723fe5b61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168741

View file

@ -100,7 +100,7 @@ archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags)
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));