[tracker/miner-fs-refactor: 68/127] libtracker-miner: Also check "config root within config root" during queries
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 68/127] libtracker-miner: Also check "config root within config root" during queries
- Date: Wed, 7 Dec 2011 10:42:40 +0000 (UTC)
commit 1624600d537bd3092524e838a62d7c116c90794c
Author: Carlos Garnacho <carlos lanedo com>
Date: Tue Oct 4 11:08:49 2011 +0200
libtracker-miner: Also check "config root within config root" during queries
src/libtracker-miner/tracker-file-notifier.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 35d6b7f..d488e12 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -357,17 +357,31 @@ crawler_directory_crawled_cb (TrackerCrawler *crawler,
static void
sparql_file_query_populate (TrackerFileNotifier *notifier,
- TrackerSparqlCursor *cursor)
+ TrackerSparqlCursor *cursor,
+ gboolean check_root)
{
TrackerFileNotifierPrivate *priv;
priv = notifier->priv;
while (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
- GFile *file, *canonical;
+ GFile *file, *canonical, *root;
const gchar *mtime, *iri;
file = g_file_new_for_uri (tracker_sparql_cursor_get_string (cursor, 0, NULL));
+
+ if (check_root) {
+ /* If it's a config root itself, other than the one
+ * currently processed, bypass it, it will be processed
+ * when the time arrives.
+ */
+ root = tracker_indexing_tree_get_root (priv->indexing_tree, file, NULL);
+
+ if (root != priv->pending_index_roots->data) {
+ continue;
+ }
+ }
+
canonical = tracker_file_system_get_file (priv->file_system,
file,
G_FILE_TYPE_UNKNOWN,
@@ -408,7 +422,7 @@ sparql_query_cb (GObject *object,
return;
}
- sparql_file_query_populate (notifier, cursor);
+ sparql_file_query_populate (notifier, cursor, TRUE);
/* Mark the directory root as queried */
tracker_file_system_set_property (priv->file_system,
@@ -477,7 +491,7 @@ sparql_file_query_start (TrackerFileNotifier *notifier,
cursor = tracker_sparql_connection_query (priv->connection,
sparql, NULL, NULL);
if (cursor) {
- sparql_file_query_populate (notifier, cursor);
+ sparql_file_query_populate (notifier, cursor, FALSE);
g_object_unref (cursor);
}
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]