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

This commit is contained in:
kientzle 2007-04-14 22:49:37 +00:00
parent 7cead8e1b5
commit badcfdefb7

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));