aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2016-11-23 15:58:45 +0200
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>2016-11-23 16:20:03 +0200
commit5e25b8037ca8858412627d76b6fe72e9c7279021 (patch)
treedc7c8c346cb6651a0486bb9093fa2cb494e877fd /src/lib/ecore_file
parenteina_file_win32: close handler in case of error (diff)
downloadefl-5e25b8037ca8858412627d76b6fe72e9c7279021.tar.gz
ecore_file: use win api for delete folder
The RemoveDirectory on Windows guarantee that given folder will be delete.
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 11c03c46d1..1b8b10a2d8 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -296,7 +296,11 @@ ecore_file_mksubdirs(const char *base, const char **subdirs)
EAPI Eina_Bool
ecore_file_rmdir(const char *dir)
{
+#ifdef _WIN32
+ if (RemoveDirectory(dir) < 0) return EINA_FALSE;
+#else
if (rmdir(dir) < 0) return EINA_FALSE;
+#endif /* _WIN32 */
return EINA_TRUE;
}