aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive_plugin.c')
-rw-r--r--src/archive_plugin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/archive_plugin.c b/src/archive_plugin.c
index 2626c53fb..86334709b 100644
--- a/src/archive_plugin.c
+++ b/src/archive_plugin.c
@@ -23,15 +23,17 @@
#include <assert.h>
struct archive_file *
-archive_file_open(const struct archive_plugin *plugin, const char *path)
+archive_file_open(const struct archive_plugin *plugin, const char *path,
+ GError **error_r)
{
struct archive_file *file;
assert(plugin != NULL);
assert(plugin->open != NULL);
assert(path != NULL);
+ assert(error_r == NULL || *error_r == NULL);
- file = plugin->open(path);
+ file = plugin->open(path, error_r);
if (file != NULL) {
assert(file->plugin != NULL);
@@ -39,6 +41,9 @@ archive_file_open(const struct archive_plugin *plugin, const char *path)
assert(file->plugin->scan_reset != NULL);
assert(file->plugin->scan_next != NULL);
assert(file->plugin->open_stream != NULL);
+ assert(error_r == NULL || *error_r == NULL);
+ } else {
+ assert(error_r == NULL || *error_r != NULL);
}
return file;