[tracker/writeback-refactor-rebase: 30/65] tracker-miner-fs: Ignore monitor events on files being written back



commit 44c8f1f76963fd7c3066b7ba993ea8cab340d628
Author: Carlos Garnacho <carlos lanedo com>
Date:   Tue Jul 19 18:17:17 2011 +0200

    tracker-miner-fs: Ignore monitor events on files being written back

 src/libtracker-miner/tracker-miner-fs.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 604a8f7..6a1fdd8 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3512,6 +3512,23 @@ check_item_queues (TrackerMinerFS *fs,
 		return TRUE;
 	}
 
+	if (queue != QUEUE_WRITEBACK) {
+		TrackerTask *task;
+
+		if (other_file) {
+			task = tracker_task_pool_find (fs->priv->task_pool, other_file);
+		} else {
+			task = tracker_task_pool_find (fs->priv->task_pool, file);
+		}
+
+		if (task && !tracker_task_get_data (task)) {
+			/* There is a writeback task for
+			 * this file, so avoid any updates
+			 */
+			return FALSE;
+		}
+	}
+
 	switch (queue) {
 	case QUEUE_CREATED:
 		/* Created items aren't likely to have



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