[tracker] libtracker-miner: Remove children recursively from queues on directory deleted



commit bd1d178ad8d6d12f70f0d5210a072f27fe379a14
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jan 28 14:00:33 2016 +0100

    libtracker-miner: Remove children recursively from queues on directory deleted
    
    We use to emit ::file-deleted on topmost directories only when deleting a
    directory tree. This means we have to remove children recursively too, because
    we'll otherwise leave stale items that are not direct children of the directory
    we notified upon.

 src/libtracker-miner/tracker-miner-fs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 2995316..f7674b1 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2905,21 +2905,21 @@ check_item_queues (TrackerMinerFS *fs,
                if (tracker_file_notifier_get_file_type (fs->priv->file_notifier,
                                                         file) == G_FILE_TYPE_DIRECTORY) {
                        if (tracker_priority_queue_foreach_remove (fs->priv->items_updated,
-                                                                  (GEqualFunc) g_file_has_parent,
+                                                                  (GEqualFunc) g_file_has_prefix,
                                                                   file,
                                                                   (GDestroyNotify) g_object_unref)) {
                                g_debug ("  Deleting previous unhandled UPDATED events on children");
                        }
 
                        if (tracker_priority_queue_foreach_remove (fs->priv->items_created,
-                                                                  (GEqualFunc) g_file_has_parent,
+                                                                  (GEqualFunc) g_file_has_prefix,
                                                                   file,
                                                                   (GDestroyNotify) g_object_unref)) {
                                g_debug ("  Deleting previous unhandled CREATED events on children");
                        }
 
                        if (tracker_priority_queue_foreach_remove (fs->priv->items_deleted,
-                                                                  (GEqualFunc) g_file_has_parent,
+                                                                  (GEqualFunc) g_file_has_prefix,
                                                                   file,
                                                                   (GDestroyNotify) g_object_unref)) {
                                g_debug ("  Deleting previous unhandled DELETED events on children");


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