[tracker/tracker-0.10] libtracker-miner: fix writeback task removal



commit 2f8bb24ff752e81ac19ea6bd58814bf05013ba2e
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Sep 21 17:55:11 2011 +0200

    libtracker-miner: fix writeback task removal
    
    The new writeback was originally developed in git master, and then ported to the
    0.10 branch. During the port of commit 83764cc99e8104b3eab7f17a116490f15251c31f
    to the 0.10 branch (commit cb65b2f804dc4fd498bf06883f0adc13c31ffff6), the
    writeback task removal with remove_writeback_task() was wrongly ported to be
    called when a CREATED event happens instead of an UPDATED event, as it should
    be. This commit fixes this issue by, and therefore it's only applicable to the
    0.10 branch.
    
    Fixes NB#283448

 src/libtracker-miner/tracker-miner-fs.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 00e73ba..ad98360 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3787,17 +3787,6 @@ monitor_item_created_cb (TrackerMonitor *monitor,
 	gchar *uri;
 
 	fs = user_data;
-
-	/* Writeback tasks would receive an updated after move,
-	 * consequence of the data being written back in the
-	 * copy, and its monitor events being propagated to
-	 * the destination file.
-	 */
-	if (remove_writeback_task (fs, file)) {
-		item_queue_handlers_set_up (fs);
-		return;
-	}
-
 	should_process = should_check_file (fs, file, is_directory);
 
 	uri = g_file_get_uri (file);
@@ -3836,6 +3825,17 @@ monitor_item_updated_cb (TrackerMonitor *monitor,
 	gchar *uri;
 
 	fs = user_data;
+
+	/* Writeback tasks would receive an updated after move,
+	 * consequence of the data being written back in the
+	 * copy, and its monitor events being propagated to
+	 * the destination file.
+	 */
+	if (remove_writeback_task (fs, file)) {
+		item_queue_handlers_set_up (fs);
+		return;
+	}
+
 	should_process = should_check_file (fs, file, is_directory);
 
 	uri = g_file_get_uri (file);



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