From 49b4f7c4acea69bb3075d9555dbd4d58f16a9f56 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Thu, 21 Feb 2013 08:49:06 +0530 Subject: Display the filename on error message Display the filename in error message instead of just text 'ZIP file' Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file.c b/file.c index 28022c85e..8f8fb90ba 100644 --- a/file.c +++ b/file.c @@ -62,7 +62,7 @@ out: #ifdef LIBZIP #include -static void zip_read(struct zip_file *file, GError **error) +static void zip_read(struct zip_file *file, GError **error, const char *filename) { int size = 1024, n, read = 0; char *mem = malloc(size); @@ -72,7 +72,7 @@ static void zip_read(struct zip_file *file, GError **error) size = read * 3 / 2; mem = realloc(mem, size); } - parse_xml_buffer(_("ZIP file"), mem, read, &dive_table, error); + parse_xml_buffer(filename, mem, read, &dive_table, error); free(mem); } #endif @@ -90,7 +90,7 @@ static int try_to_open_zip(const char *filename, struct memblock *mem, GError ** struct zip_file *file = zip_fopen_index(zip, index, 0); if (!file) break; - zip_read(file, error); + zip_read(file, error, filename); zip_fclose(file); success++; } -- cgit v1.2.3-70-g09d2