Commit fea405ea authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Do not recurse up the hierarchy for out-of-tree index requests

If we receive a tracker_miner_fs_check_file() request for a file out of
indexing trees, it'd usually end up recursing until it ran out of parents
(that is, up to file:///). This is quite pointless, if only one file was
requested to be indexed.
parent 4bf562b3
...@@ -2562,6 +2562,7 @@ item_queue_handlers_cb (gpointer user_data) ...@@ -2562,6 +2562,7 @@ item_queue_handlers_cb (gpointer user_data)
if (!parent || if (!parent ||
tracker_indexing_tree_file_is_root (fs->priv->indexing_tree, file) || tracker_indexing_tree_file_is_root (fs->priv->indexing_tree, file) ||
!tracker_indexing_tree_get_root (fs->priv->indexing_tree, file, NULL) ||
lookup_file_urn (fs, parent, TRUE)) { lookup_file_urn (fs, parent, TRUE)) {
keep_processing = item_add_or_update (fs, file, priority); keep_processing = item_add_or_update (fs, file, priority);
} else { } else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment