[tracker/tracker-0.8] libtracker-miner: Queue deleted items instead of removing in a tight loop.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] libtracker-miner: Queue deleted items instead of removing in a tight loop.
- Date: Thu, 17 Jun 2010 15:38:49 +0000 (UTC)
commit 9738231dc917a2b94dffb3ffe8ac325df7cbbc4c
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 10 16:18:23 2010 +0200
libtracker-miner: Queue deleted items instead of removing in a tight loop.
src/libtracker-miner/tracker-miner-fs.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 8b44f45..09c1f85 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2215,9 +2215,16 @@ remove_unexisting_file_cb (gpointer key,
/* If file no longer exists, remove it from the store*/
if (!g_file_query_exists (file, NULL)) {
- g_debug ("Removing file which no longer exists in FS: %s",
- g_file_get_uri (file));
- item_remove (fs, file);
+ gchar *uri;
+
+ uri = g_file_get_uri (file);
+ g_debug ("Marking file which no longer exists in FS for removal: %s", uri);
+ g_free (uri);
+
+ g_queue_push_tail (fs->private->items_deleted,
+ g_object_ref (file));
+
+ item_queue_handlers_set_up (fs);
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]