summaryrefslogtreecommitdiff
path: root/libarchive
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2010-02-05 15:09:22 +0100
committerTomas Bzatek <tbzatek@redhat.com>2010-02-05 15:09:22 +0100
commite5d980324e0347af852721f4a345049b76901966 (patch)
tree0371dd9d4ef8fe573fa8e2e5db6334f6e55522b7 /libarchive
parenta9578de2a6f31dee162e7f9470d096fa6861a205 (diff)
downloadtuxcmd-modules-e5d980324e0347af852721f4a345049b76901966.tar.xz
libarchive: better error reporting during extraction
Diffstat (limited to 'libarchive')
-rw-r--r--libarchive/libarchive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/libarchive.c b/libarchive/libarchive.c
index 8a507e3..58bbbcc 100644
--- a/libarchive/libarchive.c
+++ b/libarchive/libarchive.c
@@ -740,8 +740,9 @@ my_archive_read_data_into_fd (struct TVFSGlobs *globs, struct archive *a, struct
}
}
+ /* FIXME: shall we treat ARCHIVE_EOF as an error? */
if (r != ARCHIVE_OK && r != ARCHIVE_EOF) {
- fprintf (stderr, "(EE) my_archive_read_data_into_fd: error closing extracted file: %s\n", strerror (errno));
+ fprintf (stderr, "(EE) my_archive_read_data_into_fd: error reading archive: %s\n", archive_error_string (a));
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (archive_errno (a)), archive_error_string (a));
close (fd);
return FALSE;