summaryrefslogtreecommitdiff
path: root/src/update_walk.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-16 16:40:22 +0100
committerMax Kellermann <max@duempel.org>2009-12-16 17:10:19 +0100
commit71fee0974402702c16b40dc6791196c46fb038bb (patch)
tree4e6270b610d56092970ea31193d09adf59490ae6 /src/update_walk.c
parentf9af1a445efedc049a6a608a76088578e3cca4b3 (diff)
archive_plugin: use GError in the open() method
Diffstat (limited to 'src/update_walk.c')
-rw-r--r--src/update_walk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/update_walk.c b/src/update_walk.c
index f6f924bd6..db3111326 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -394,6 +394,7 @@ update_archive_file(struct directory *parent, const char *name,
const struct stat *st,
const struct archive_plugin *plugin)
{
+ GError *error = NULL;
char *path_fs;
struct archive_file *file;
struct directory *directory;
@@ -409,10 +410,11 @@ update_archive_file(struct directory *parent, const char *name,
path_fs = map_directory_child_fs(parent, name);
/* open archive */
- file = archive_file_open(plugin, path_fs);
+ file = archive_file_open(plugin, path_fs, &error);
if (file == NULL) {
- g_warning("unable to open archive %s", path_fs);
g_free(path_fs);
+ g_warning("%s", error->message);
+ g_error_free(error);
return;
}