efreet - fix recusrion checks need to pop as well as push.

stable release - cherry-pick me!

this fixes a lack of popping the efret recursion stack handler. this
wasn't done in 1.8 and is a bug.
This commit is contained in:
Carsten Haitzler 2013-12-05 17:41:48 +09:00
parent 749d5d7b50
commit 931d02378b
2 changed files with 13 additions and 3 deletions

View File

@ -153,7 +153,11 @@ cache_scan(Eina_Inarray *stack, const char *path, const char *base_id,
eina_inarray_push(stack, &st);
it = eina_file_stat_ls(path);
if (!it) return 1;
if (!it)
{
eina_inarray_pop(stack);
return 1;
}
id[0] = '\0';
EINA_ITERATOR_FOREACH(it, info)
{
@ -182,11 +186,13 @@ cache_scan(Eina_Inarray *stack, const char *path, const char *base_id,
if (!cache_add(info->path, file_id, priority, changed))
{
eina_iterator_free(it);
eina_inarray_pop(stack);
return 0;
}
}
}
eina_iterator_free(it);
eina_inarray_pop(stack);
return 1;
}

View File

@ -284,7 +284,7 @@ icon_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Bool b
}
if (ecore_file_is_dir(path)) icon_changes_monitor_add(path);
it = eina_file_stat_ls(path);
if (!it) return;
if (!it) goto end;
EINA_ITERATOR_FOREACH(it, info)
{
if (info->path[info->name_start] == '.') continue;
@ -293,6 +293,8 @@ icon_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Bool b
icon_changes_listen_recursive(stack, info->path, EINA_FALSE);
}
eina_iterator_free(it);
end:
eina_inarray_pop(stack);
}
static void
@ -319,7 +321,7 @@ desktop_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Boo
}
if (ecore_file_is_dir(path)) desktop_changes_monitor_add(path);
it = eina_file_stat_ls(path);
if (!it) return;
if (!it) goto end;
EINA_ITERATOR_FOREACH(it, info)
{
if (info->path[info->name_start] == '.') continue;
@ -328,6 +330,8 @@ desktop_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Boo
desktop_changes_listen_recursive(stack, info->path, EINA_FALSE);
}
eina_iterator_free(it);
end:
eina_inarray_pop(stack);
}
static void