summaryrefslogtreecommitdiff
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-05 17:41:48 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-05 20:04:25 +0900
commit931d02378b3152b530d84bff09fd842cf0998f53 (patch)
treeee0a9490d41152aa1b3bffb6a6b37daaedcb911d /src/bin/efreet
parent749d5d7b501e28cb7a607be3d8471af8b6740571 (diff)
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.
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c8
-rw-r--r--src/bin/efreet/efreetd_cache.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index 9ddf26dbb6..d67084d467 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -153,7 +153,11 @@ cache_scan(Eina_Inarray *stack, const char *path, const char *base_id,
153 eina_inarray_push(stack, &st); 153 eina_inarray_push(stack, &st);
154 154
155 it = eina_file_stat_ls(path); 155 it = eina_file_stat_ls(path);
156 if (!it) return 1; 156 if (!it)
157 {
158 eina_inarray_pop(stack);
159 return 1;
160 }
157 id[0] = '\0'; 161 id[0] = '\0';
158 EINA_ITERATOR_FOREACH(it, info) 162 EINA_ITERATOR_FOREACH(it, info)
159 { 163 {
@@ -182,11 +186,13 @@ cache_scan(Eina_Inarray *stack, const char *path, const char *base_id,
182 if (!cache_add(info->path, file_id, priority, changed)) 186 if (!cache_add(info->path, file_id, priority, changed))
183 { 187 {
184 eina_iterator_free(it); 188 eina_iterator_free(it);
189 eina_inarray_pop(stack);
185 return 0; 190 return 0;
186 } 191 }
187 } 192 }
188 } 193 }
189 eina_iterator_free(it); 194 eina_iterator_free(it);
195 eina_inarray_pop(stack);
190 return 1; 196 return 1;
191} 197}
192 198
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 5b454875b3..0d588970c7 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -284,7 +284,7 @@ icon_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Bool b
284 } 284 }
285 if (ecore_file_is_dir(path)) icon_changes_monitor_add(path); 285 if (ecore_file_is_dir(path)) icon_changes_monitor_add(path);
286 it = eina_file_stat_ls(path); 286 it = eina_file_stat_ls(path);
287 if (!it) return; 287 if (!it) goto end;
288 EINA_ITERATOR_FOREACH(it, info) 288 EINA_ITERATOR_FOREACH(it, info)
289 { 289 {
290 if (info->path[info->name_start] == '.') continue; 290 if (info->path[info->name_start] == '.') continue;
@@ -293,6 +293,8 @@ icon_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Bool b
293 icon_changes_listen_recursive(stack, info->path, EINA_FALSE); 293 icon_changes_listen_recursive(stack, info->path, EINA_FALSE);
294 } 294 }
295 eina_iterator_free(it); 295 eina_iterator_free(it);
296end:
297 eina_inarray_pop(stack);
296} 298}
297 299
298static void 300static void
@@ -319,7 +321,7 @@ desktop_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Boo
319 } 321 }
320 if (ecore_file_is_dir(path)) desktop_changes_monitor_add(path); 322 if (ecore_file_is_dir(path)) desktop_changes_monitor_add(path);
321 it = eina_file_stat_ls(path); 323 it = eina_file_stat_ls(path);
322 if (!it) return; 324 if (!it) goto end;
323 EINA_ITERATOR_FOREACH(it, info) 325 EINA_ITERATOR_FOREACH(it, info)
324 { 326 {
325 if (info->path[info->name_start] == '.') continue; 327 if (info->path[info->name_start] == '.') continue;
@@ -328,6 +330,8 @@ desktop_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Boo
328 desktop_changes_listen_recursive(stack, info->path, EINA_FALSE); 330 desktop_changes_listen_recursive(stack, info->path, EINA_FALSE);
329 } 331 }
330 eina_iterator_free(it); 332 eina_iterator_free(it);
333end:
334 eina_inarray_pop(stack);
331} 335}
332 336
333static void 337static void