Commit 87a484a5 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

use the uri if the id is not available

parent 4d1b0df5
......@@ -339,15 +339,20 @@ for_each_child_next_files_ready (GObject *source_object,
file = g_file_get_child (fec->current->file, g_file_info_get_name (child_info));
if (g_file_info_get_file_type (child_info) == G_FILE_TYPE_DIRECTORY) {
const char *id;
char *id;
/* avoid to visit a directory more than ones */
id = g_file_info_get_attribute_string (child_info, G_FILE_ATTRIBUTE_ID_FILE);
id = g_strdup (g_file_info_get_attribute_string (child_info, G_FILE_ATTRIBUTE_ID_FILE));
if (id == NULL)
id = g_file_get_uri (file);
if (g_hash_table_lookup (fec->already_visited, id) == NULL) {
g_hash_table_insert (fec->already_visited, g_strdup (id), GINT_TO_POINTER (1));
fec->to_visit = g_list_append (fec->to_visit, child_data_new (file, child_info));
g_free (id);
fec->for_each_file_func (file, child_info, fec->user_data);
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