Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// Try opening the archive file
r = archive_read_file_open(a, archive->f);
- if (r) {
- CTX_ERROR(archive->ctx, "Could not open archive %s: %s\n",
- archive->path, archive_error_string(a));
- goto ERROR;
+ switch (r) {
+ case ARCHIVE_OK:
+ break;
+
+ case ARCHIVE_FATAL:
+ r = -ENOMSG;
+ goto ERROR;
+
+ default:
+ CTX_ERROR(archive->ctx, "Could not open archive %s: %s\n",
+ archive->path, archive_error_string(a));
+ goto ERROR;
}
// Return pointer