When unreferencing the info object, the name attribute would be
released, resulting in a bug when trying to copy it right after that.
So, we unreference the info object in the end of the loop now.
{
name = g_file_info_get_name (info);
filename = g_build_filename (root, name, NULL);
- g_object_unref (info);
file = g_file_new_for_path (filename);
entry = gio_file_to_atom (ctx, file);
if (entry)
}
g_object_unref (file);
g_free (filename);
+ g_object_unref (info);
}
g_object_unref (enumerator);
g_object_unref (dir);