You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gnome-epub-thumbnailer/0001-epub-Set-an-error-when...

28 lines
798 B

From 68841e9a7658b6bafd4d94f4199ea047d303f1d3 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sun, 1 Sep 2013 17:26:13 +0200
Subject: [PATCH] epub: Set an error when the cover can't be found
This stops a crash in the thumbnailer if the cover cannot
be found.
---
gnome-epub-thumbnailer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index e2a3615..1cb8149 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -283,7 +283,7 @@ file_to_data (const char *path,
}
if (cover_data == NULL) {
- g_warning ("Could not find cover file in '%s'", path);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Could not find cover file");
return NULL;
}
--
1.8.3.1