[gnome-photos] local-item: Guard for collections



commit 2ca39225badad6bcce356d7ea0218ac308844965
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jul 30 17:06:54 2014 +0200

    local-item: Guard for collections
    
    Collections are just an entry in Tracker. They can't and needn't be
    deleted using the GFile API.
    
    Fixes: https://bugzilla.gnome.org/720222

 src/photos-local-item.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index 3af4b5d..360ffe4 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -137,6 +137,9 @@ photos_local_item_trash (PhotosBaseItem *item)
   GFile *file;
   const gchar *uri;
 
+  if (photos_base_item_is_collection (item))
+    return;
+
   uri = photos_base_item_get_uri (item);
   file = g_file_new_for_uri (uri);
   g_file_delete_async (file, G_PRIORITY_DEFAULT, NULL, photos_local_item_delete, g_object_ref (item));


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