[gnome-epub-thumbnailer] epub: Add a warning when reading empty files
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-epub-thumbnailer] epub: Add a warning when reading empty files
- Date: Mon, 2 Sep 2013 01:08:43 +0000 (UTC)
commit d2f1236c69c190299afd6d020a4b97158ebee962
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 2 03:07:33 2013 +0200
epub: Add a warning when reading empty files
gnome-epub-thumbnailer.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index 20c81d9..13cc2d9 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -89,6 +89,10 @@ file_get_zipped_contents (const char *filename,
read = archive_read_data (a, buf, size);
if (read <= 0) {
g_free (buf);
+ if (read < 0)
+ g_warning ("Fatal error reading '%s' in archive: %s", name,
archive_error_string (a));
+ else
+ g_warning ("Read an empty file from the archive");
} else {
ret = buf;
*length = size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]