[gnome-photos] base-item: Add debug messages for failing to use a thumbnail file



commit e994a13a1eab8611f0cad10c89a8f3adcfa8d1bf
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Feb 8 10:04:43 2014 +0100

    base-item: Add debug messages for failing to use a thumbnail file

 src/photos-base-item.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 303d280..8eb6f67 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -406,11 +406,15 @@ photos_base_item_refresh_thumb_path_pixbuf (GObject *source_object, GAsyncResult
   if (error != NULL)
     {
       GFile *file;
+      gchar *uri;
 
+      file = G_FILE (g_object_get_data (G_OBJECT (stream), "file"));
+      uri = g_file_get_uri (file);
+      g_warning ("Unable to create pixbuf from %s: %s", uri, error->message);
       priv->failed_thumbnailing = TRUE;
       priv->thumb_path = NULL;
-      file = G_FILE (g_object_get_data (G_OBJECT (stream), "file"));
       g_file_delete_async (file, G_PRIORITY_DEFAULT, NULL, NULL, NULL);
+      g_free (uri);
       g_error_free (error);
       goto out;
     }
@@ -436,9 +440,14 @@ photos_base_item_refresh_thumb_path_read (GObject *source_object, GAsyncResult *
   stream = g_file_read_finish (file, res, &error);
   if (error != NULL)
     {
+      gchar *uri;
+
+      uri = g_file_get_uri (file);
+      g_warning ("Unable to read file at %s: %s", uri, error->message);
       priv->failed_thumbnailing = TRUE;
       priv->thumb_path = NULL;
       g_file_delete_async (file, G_PRIORITY_DEFAULT, NULL, NULL, NULL);
+      g_free (uri);
       g_error_free (error);
       goto out;
     }


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