]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Return 0 if extraction was successful
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 14:51:56 +0000 (15:51 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 14:51:56 +0000 (15:51 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index 00dcf6f3c4b3ed7b66231edaa6b3475fd0309fc4..cb0fdbca3585b2815a17c19d26fb2d7865f831c5 100644 (file)
@@ -535,8 +535,10 @@ static int archive_extract(struct archive* a, const char* prefix) {
                r = archive_read_next_header(a, &entry);
 
                // Reached the end of the archive.
-               if (r == ARCHIVE_EOF)
+               if (r == ARCHIVE_EOF) {
+                       r = 0;
                        break;
+               }
 
                // Prepend the prefix to the path the file is extracted to.
                const char* archive_pathname = archive_entry_pathname(entry);