[tracker/tracker-0.10] libtracker-miner: check writeback task pool when translating MOVED events to CREATED



commit 73865a236df62e69e577214c29306db23da9537c
Author: Carlos Garnacho <carlos lanedo com>
Date:   Wed Jul 20 17:58:01 2011 +0200

    libtracker-miner: check writeback task pool when translating MOVED events to CREATED
    
    A move event from an ignored file to a non-ignored one will be translated to a CREATED
    event, So check first whether there are no writeback tasks for the "new" file, since
    this is a common operation.

 src/libtracker-miner/tracker-miner-fs.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 3ad12b0..9b2521f 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3958,12 +3958,14 @@ monitor_item_moved_cb (TrackerMonitor *monitor,
 				/* Source file was not stored, check dest file as new */
 				if (!is_directory ||
 				    !should_recurse_for_directory (fs, other_file)) {
-					trace_eq_push_tail ("CREATED", other_file, "On move monitor event");
-					tracker_priority_queue_add (fs->priv->items_created,
-					                            g_object_ref (other_file),
-					                            G_PRIORITY_DEFAULT);
-
-					item_queue_handlers_set_up (fs);
+					if (check_item_queues (fs, QUEUE_CREATED, other_file, NULL)) {
+						trace_eq_push_tail ("CREATED", other_file, "On move monitor event");
+						tracker_priority_queue_add (fs->priv->items_created,
+									    g_object_ref (other_file),
+									    G_PRIORITY_DEFAULT);
+
+						item_queue_handlers_set_up (fs);
+					}
 				} else {
 					tracker_miner_fs_directory_add_internal (fs, other_file,
 					                                         G_PRIORITY_DEFAULT);



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