summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/src/encarchive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/encarchive.c b/c/src/encarchive.c
index 45e840f..0b63484 100644
--- a/c/src/encarchive.c
+++ b/c/src/encarchive.c
@@ -88,7 +88,10 @@ int enc_archive_extract(char* srcarchive, char* dest) {
return r;
// Open the archive
- archive_read_open(a, cd, cd_open, cd_read, cd_close);
+ if(archive_read_open(a, cd, cd_open, cd_read, cd_close) < 0) {
+ printf("Error: Could not open archive '%s'\n", srcarchive);
+ return 1;
+ }
while(archive_read_next_header(a, &entry) == ARCHIVE_OK) {
archive_read_extract(a, entry, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS);
archive_read_data_skip(a);

Generated by cgit