[tracker] libtracker-miner: Cancel crawling/querying on both cancellation paths



commit 334517ede02e594f7e6b9af963d015f6d0935d3f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Feb 25 15:35:50 2016 +0100

    libtracker-miner: Cancel crawling/querying on both cancellation paths
    
    When a currently inspected folder is cancelled, we could either jump to
    the next pending dir (if any) or the next crawling root, we must cancel
    these two operations prior to both.

 src/libtracker-miner/tracker-file-notifier.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 373c581..049fba9 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -730,12 +730,10 @@ file_notifier_current_root_check_remove_directory (TrackerFileNotifier *notifier
 
        if (priv->current_index_root &&
            root_data_remove_directory (priv->current_index_root, file)) {
-               if (g_queue_get_length (priv->current_index_root->pending_dirs) > 0) {
-                       crawl_directory_in_current_root (notifier);
-               } else {
-                       g_cancellable_cancel (priv->cancellable);
-                       tracker_crawler_stop (priv->crawler);
+               g_cancellable_cancel (priv->cancellable);
+               tracker_crawler_stop (priv->crawler);
 
+               if (!crawl_directory_in_current_root (notifier)) {
                        if (priv->current_index_root) {
                                root_data_free (priv->current_index_root);
                                priv->current_index_root = NULL;


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