[tracker] libtracker-miner: Check deleted files on TrackerIndexingTree:directory-updated



commit 522aeb902c198e70235c36c96b1b868b9f2f53ad
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 3 01:13:31 2016 +0200

    libtracker-miner: Check deleted files on TrackerIndexingTree:directory-updated
    
    Add the TRACKER_DIRECTORY_FLAG_CHECK_DELETED flag, so deleted contents are
    checked on all folders.

 src/libtracker-miner/tracker-file-notifier.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index a530223..ce97f84 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1453,6 +1453,24 @@ indexing_tree_directory_added (TrackerIndexingTree *indexing_tree,
 }
 
 static void
+indexing_tree_directory_updated (TrackerIndexingTree *indexing_tree,
+                                 GFile               *directory,
+                                 gpointer             user_data)
+{
+       TrackerFileNotifier *notifier = user_data;
+       TrackerFileNotifierPrivate *priv = notifier->priv;
+       TrackerDirectoryFlags flags;
+
+       tracker_indexing_tree_get_root (indexing_tree, directory, &flags);
+       flags |= TRACKER_DIRECTORY_FLAG_CHECK_DELETED;
+
+       directory = tracker_file_system_get_file (priv->file_system, directory,
+                                                 G_FILE_TYPE_DIRECTORY, NULL);
+       notifier_queue_file (notifier, directory, flags);
+       crawl_directories_start (notifier);
+}
+
+static void
 indexing_tree_directory_removed (TrackerIndexingTree *indexing_tree,
                                  GFile               *directory,
                                  gpointer             user_data)
@@ -1593,7 +1611,7 @@ tracker_file_notifier_constructed (GObject *object)
        g_signal_connect (priv->indexing_tree, "directory-added",
                          G_CALLBACK (indexing_tree_directory_added), object);
        g_signal_connect (priv->indexing_tree, "directory-updated",
-                         G_CALLBACK (indexing_tree_directory_added), object);
+                         G_CALLBACK (indexing_tree_directory_updated), object);
        g_signal_connect (priv->indexing_tree, "directory-removed",
                          G_CALLBACK (indexing_tree_directory_removed), object);
 


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