diff options
author | Max Kellermann <max@duempel.org> | 2009-12-16 16:40:22 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-16 17:10:19 +0100 |
commit | 71fee0974402702c16b40dc6791196c46fb038bb (patch) | |
tree | 4e6270b610d56092970ea31193d09adf59490ae6 /src/archive/zzip_archive_plugin.c | |
parent | f9af1a445efedc049a6a608a76088578e3cca4b3 (diff) | |
download | mpd-71fee0974402702c16b40dc6791196c46fb038bb.tar.gz mpd-71fee0974402702c16b40dc6791196c46fb038bb.tar.xz mpd-71fee0974402702c16b40dc6791196c46fb038bb.zip |
archive_plugin: use GError in the open() method
Diffstat (limited to 'src/archive/zzip_archive_plugin.c')
-rw-r--r-- | src/archive/zzip_archive_plugin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/archive/zzip_archive_plugin.c b/src/archive/zzip_archive_plugin.c index 1174629ae..43c880aab 100644 --- a/src/archive/zzip_archive_plugin.c +++ b/src/archive/zzip_archive_plugin.c @@ -52,7 +52,7 @@ zzip_quark(void) /* archive open && listing routine */ static struct archive_file * -zzip_archive_open(const char *pathname) +zzip_archive_open(const char *pathname, GError **error_r) { struct zzip_archive *context = g_malloc(sizeof(*context)); ZZIP_DIRENT dirent; @@ -63,7 +63,8 @@ zzip_archive_open(const char *pathname) context->list = NULL; context->dir = zzip_dir_open(pathname, NULL); if (context->dir == NULL) { - g_warning("zipfile %s open failed\n", pathname); + g_set_error(error_r, zzip_quark(), 0, + "Failed to open ZIP file %s", pathname); return NULL; } |