[tracker] libtracker-miner: Use interned GFiles in TrackerIndexingTree signals
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Use interned GFiles in TrackerIndexingTree signals
- Date: Tue, 13 Dec 2011 17:37:26 +0000 (UTC)
commit e16dce9ad6837ccb3a714667d02b112a84df7dd9
Author: Carlos Garnacho <carlos lanedo com>
Date: Tue Dec 13 13:55:56 2011 +0100
libtracker-miner: Use interned GFiles in TrackerIndexingTree signals
This is so callers may rely on equality instead of g_file_equal(), fixes
cancel-crawling-on-unmount in TrackerFileNotifier.
src/libtracker-miner/tracker-file-notifier.c | 2 +-
src/libtracker-miner/tracker-indexing-tree.c | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index f1a8e3b..e8a1229 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1008,7 +1008,7 @@ indexing_tree_directory_removed (TrackerIndexingTree *indexing_tree,
TrackerDirectoryFlags flags;
/* Flags are still valid at the moment of deletion */
- tracker_indexing_tree_get_root (indexing_tree, directory, &flags);
+ directory = tracker_indexing_tree_get_root (indexing_tree, directory, &flags);
/* If the folder was being ignored, index/crawl it from scratch */
if (flags & TRACKER_DIRECTORY_FLAG_IGNORE) {
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index dae2d4e..abc9a38 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -392,7 +392,7 @@ tracker_indexing_tree_add (TrackerIndexingTree *tree,
data->flags = flags;
g_signal_emit (tree, signals[DIRECTORY_UPDATED], 0,
- directory);
+ data->file);
}
return;
}
@@ -448,16 +448,17 @@ tracker_indexing_tree_remove (TrackerIndexingTree *tree,
return;
}
+ data = node->data;
+
if (!node->parent) {
/* Node is the config tree
* root, mark as shallow again
*/
- data = node->data;
data->shallow = TRUE;
return;
}
- g_signal_emit (tree, signals[DIRECTORY_REMOVED], 0, directory);
+ g_signal_emit (tree, signals[DIRECTORY_REMOVED], 0, data->file);
parent = node->parent;
g_node_unlink (node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]