[gnome-font-viewer] font-model: add some debug information
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-font-viewer] font-model: add some debug information
- Date: Thu, 4 Jul 2019 23:09:45 +0000 (UTC)
commit 2b72eab3d03f0673538b7c34941dc96e5e09dde7
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jul 4 14:20:34 2019 -0700
font-model: add some debug information
src/font-model.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/font-model.c b/src/font-model.c
index 8301f45..bd6d266 100644
--- a/src/font-model.c
+++ b/src/font-model.c
@@ -186,19 +186,24 @@ create_thumbnail (ThumbInfoData *thumb_info)
GFile *file = thumb_info->font_file;
GnomeDesktopThumbnailFactory *factory;
guint64 mtime;
+ GError *error = NULL;
GdkPixbuf *pixbuf = NULL;
GFileInfo *info = NULL;
info = g_file_query_info (file, ATTRIBUTES_FOR_CREATING_THUMBNAIL,
G_FILE_QUERY_INFO_NONE,
- NULL, NULL);
+ NULL, &error);
/* we don't care about reporting errors here, just fail the
* thumbnail.
*/
- if (info == NULL)
+ if (info == NULL) {
+ char *font_path = g_file_get_path (file);
+ g_debug ("Can't query info for file %s: %s\n", font_path, error->message);
+ g_free (font_path);
goto out;
+ }
mtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
@@ -217,6 +222,7 @@ create_thumbnail (ThumbInfoData *thumb_info)
g_object_unref (factory);
out:
+ g_clear_error (&error);
g_clear_object (&info);
if (pixbuf != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]