[gnome-epub-thumbnailer] main: Add warning when reading cover fails



commit 0e6438bd8df550a58732c87123f51921e36f8243
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jul 13 14:25:20 2013 +0200

    main: Add warning when reading cover fails
    
    If we managed to find the cover path, but we can't decompress the
    data, print a warning and carry on.

 gnome-epub-thumbnailer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index 59cea52..a482ecd 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -304,6 +304,9 @@ int main (int argc, char **argv)
        g_free (metafile);
        if (cover_path != NULL) {
                cover_data = file_get_zipped_contents (input_filename, (GCompareFunc) g_strcmp0, cover_path, 
&length);
+               if (cover_data == NULL)
+                       g_warning ("Could not open cover file '%s' in '%s'",
+                                  cover_path, filenames[0]);
                g_free (cover_path);
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]