Do not leak file info for . and .. dirs

fa5fa82ce0
This commit is contained in:
JosephMcc 2017-02-13 14:24:32 -08:00
parent f20b3bdcf5
commit 4c45b083e1
1 changed files with 4 additions and 2 deletions

View File

@ -2276,15 +2276,17 @@ model_add_nodes_from_files (XedFileBrowserStore *model,
(strcmp (name, ".") == 0 ||
strcmp (name, "..") == 0))
{
g_object_unref (info);
continue;
}
file = g_file_get_child (parent->file, name);
if ((node = node_list_contains_file (original_children, file)) == NULL)
node = node_list_contains_file (original_children, file);
if (node == NULL)
{
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
if (type == G_FILE_TYPE_DIRECTORY)
{
node = file_browser_node_dir_new (model, file, parent);
}