Commit fbb40507 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Handle deletes of files triggering parent folder filters

Theoretically at least, since we don't have file monitors on the directory
in that case. The code is now correct at least.
parent b3d7abf3
......@@ -1288,12 +1288,6 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
tracker_monitor_remove_recursively (priv->monitor, file);
}
if (!tracker_indexing_tree_file_is_indexable (priv->indexing_tree,
file, file_type)) {
/* File was not indexed */
return ;
}
if (!is_directory) {
TrackerDirectoryFlags flags;
gboolean indexable;
......@@ -1305,7 +1299,6 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
indexable = tracker_indexing_tree_parent_is_indexable (priv->indexing_tree,
parent, children);
g_object_unref (parent);
g_list_free (children);
/* note: This supposedly works, but in practice
......@@ -1317,15 +1310,23 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
/* New file was triggering a directory content
* filter, reindex parent directory altogether
*/
file = tracker_file_system_get_file (priv->file_system,
file,
G_FILE_TYPE_DIRECTORY,
NULL);
canonical = tracker_file_system_get_file (priv->file_system,
parent,
G_FILE_TYPE_DIRECTORY,
NULL);
tracker_indexing_tree_get_root (priv->indexing_tree,
file, &flags);
notifier_queue_root (notifier, file, flags, FALSE);
canonical, &flags);
notifier_queue_root (notifier, canonical, flags, FALSE);
return;
}
g_object_unref (parent);
}
if (!tracker_indexing_tree_file_is_indexable (priv->indexing_tree,
file, file_type)) {
/* File was not indexed */
return ;
}
/* Fetch the interned copy */
......
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