Commit bd1d178a authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Remove children recursively from queues on directory deleted

We use to emit ::file-deleted on topmost directories only when deleting a
directory tree. This means we have to remove children recursively too, because
we'll otherwise leave stale items that are not direct children of the directory
we notified upon.
parent fc43dd55
......@@ -2905,21 +2905,21 @@ check_item_queues (TrackerMinerFS *fs,
if (tracker_file_notifier_get_file_type (fs->priv->file_notifier,
file) == G_FILE_TYPE_DIRECTORY) {
if (tracker_priority_queue_foreach_remove (fs->priv->items_updated,
(GEqualFunc) g_file_has_parent,
(GEqualFunc) g_file_has_prefix,
file,
(GDestroyNotify) g_object_unref)) {
g_debug (" Deleting previous unhandled UPDATED events on children");
}
if (tracker_priority_queue_foreach_remove (fs->priv->items_created,
(GEqualFunc) g_file_has_parent,
(GEqualFunc) g_file_has_prefix,
file,
(GDestroyNotify) g_object_unref)) {
g_debug (" Deleting previous unhandled CREATED events on children");
}
if (tracker_priority_queue_foreach_remove (fs->priv->items_deleted,
(GEqualFunc) g_file_has_parent,
(GEqualFunc) g_file_has_prefix,
file,
(GDestroyNotify) g_object_unref)) {
g_debug (" Deleting previous unhandled DELETED events on children");
......
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