[gnome-epub-thumbnailer] main: Print a full error when opening image fails



commit 0e697983ab09092fbe0d51212f75cbc4ec2d522a
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jul 13 14:27:07 2013 +0200

    main: Print a full error when opening image fails

 gnome-epub-thumbnailer.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index 6005e02..c47a6ae 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -330,12 +330,13 @@ int main (int argc, char **argv)
        }
 
        mem_stream = g_memory_input_stream_new_from_data (cover_data, length, g_free);
-       pixbuf = gdk_pixbuf_new_from_stream_at_scale (mem_stream, output_size, -1, TRUE, NULL, NULL);
+       pixbuf = gdk_pixbuf_new_from_stream_at_scale (mem_stream, output_size, -1, TRUE, NULL, &error);
        g_object_unref (mem_stream);
 
        if (!pixbuf) {
-               g_warning ("Couldn't open embedded cover image for file '%s'",
-                          filenames[0]);
+               g_warning ("Couldn't open embedded cover image for file '%s': %s",
+                          filenames[0], error->message);
+               g_error_free (error);
                return 1;
        }
 


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