[gnome-photos] local-item: Simplify conversion of URI to local path



commit 44b46a8890c960c299d030c3073f963abda17862
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Jul 27 15:42:46 2013 +0200

    local-item: Simplify conversion of URI to local path

 src/photos-local-item.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index 9ff7d7b..03746eb 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -55,15 +55,11 @@ photos_local_item_create_thumbnail (PhotosBaseItem *item, GCancellable *cancella
 static gchar *
 photos_local_item_download (PhotosBaseItem *item, GCancellable *cancellable, GError **error)
 {
-  GFile *file = NULL;
   const gchar *uri;
-  gchar *path = NULL;
+  gchar *path;
 
   uri = photos_base_item_get_uri (item);
-  file = g_file_new_for_uri (uri);
-  path = g_file_get_path (file);
-
-  g_object_unref (file);
+  path = g_filename_from_uri (uri, NULL, error);
   return path;
 }
 


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