eio: destroy leaf before root.
authorCedric BAIL <cedric.bail@free.fr>
Tue, 19 Apr 2011 15:27:21 +0000 (15:27 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Tue, 19 Apr 2011 15:27:21 +0000 (15:27 +0000)
SVN revision: 58732

legacy/eio/src/lib/eio_dir.c

index 1e5bfae9d62029fe08e27c9094a5f907e9a537d5..d4d3cfcd4684e46d1df12179820cd360898b963b 100644 (file)
@@ -775,6 +775,10 @@ _eio_dir_rmrf_heavy(void *data, Ecore_Thread *thread)
      }
    file = NULL;
 
+   /* reverse directory listing, so the leaf would be destroyed before
+      the root */
+   rmrf->dirs = eina_list_reverse(rmrf->dirs);
+
    EINA_LIST_FREE(rmrf->dirs, dir)
      {
         if (rmdir(dir) != 0)