Commit 7d279178 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Unparent children on TrackerFileSystem root dispose

We unparented children on intermediate folders, but didn't handle the
case of the root folder disappearing. Unparent the child nodes so
they get correctly freed when the respective GFiles are disposed.
parent 4b125e78
......@@ -464,10 +464,6 @@ reparent_child_nodes_to_parent (GNode *node)
FileNodeData *node_data;
GNode *child, *parent;
if (!node->parent) {
return;
}
parent = node->parent;
node_data = node->data;
child = g_node_first_child (node);
......@@ -489,8 +485,12 @@ reparent_child_nodes_to_parent (GNode *node)
data->uri_prefix = uri_prefix;
g_node_unlink (cur);
g_node_prepend (parent, cur);
if (parent)
g_node_prepend (parent, cur);
}
g_assert (!g_node_first_child (node));
}
static void
......
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