summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file/ecore_file.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2018-01-27 15:17:17 +0100
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-30 16:52:24 +0900
commitef0f0a50b2912f442f14dc2ba3c071b7122faf6e (patch)
tree40b8f9b970f72167db45f0f7aed7c33a7f706a7d /src/lib/ecore_file/ecore_file.c
parentd7170beb76d6b3a96142d3d4750afdb7fdb7d4fa (diff)
Ecore_File: remove symlinks support on Windows (library and test)
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_file/ecore_file.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 15d96edb6e..89b6f2b373 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -320,11 +320,6 @@ ecore_file_recursive_rm(const char *dir)
320 Eina_Bool is_dir; 320 Eina_Bool is_dir;
321 321
322#ifdef _WIN32 322#ifdef _WIN32
323 char buf[PATH_MAX];
324
325 if (readlink(dir, buf, sizeof(buf) - 1) > 0)
326 return ecore_file_unlink(dir);
327
328 if (!_ecore_file_stat(dir, NULL, NULL, NULL, &is_dir, NULL)) 323 if (!_ecore_file_stat(dir, NULL, NULL, NULL, &is_dir, NULL))
329 return EINA_FALSE; 324 return EINA_FALSE;
330#else 325#else
@@ -545,9 +540,13 @@ FAIL:
545EAPI Eina_Bool 540EAPI Eina_Bool
546ecore_file_symlink(const char *src, const char *dest) 541ecore_file_symlink(const char *src, const char *dest)
547{ 542{
548 if (!symlink(src, dest)) return EINA_TRUE; 543#ifndef _WIN32
549 544 return !symlink(src, dest);
545#else
550 return EINA_FALSE; 546 return EINA_FALSE;
547 (void)src;
548 (void)dest;
549#endif
551} 550}
552 551
553EAPI char * 552EAPI char *
@@ -630,12 +629,17 @@ ecore_file_can_exec(const char *file)
630EAPI char * 629EAPI char *
631ecore_file_readlink(const char *link) 630ecore_file_readlink(const char *link)
632{ 631{
632#ifndef _WIN32
633 char buf[PATH_MAX]; 633 char buf[PATH_MAX];
634 int count; 634 int count;
635 635
636 if ((count = readlink(link, buf, sizeof(buf) - 1)) < 0) return NULL; 636 if ((count = readlink(link, buf, sizeof(buf) - 1)) < 0) return NULL;
637 buf[count] = 0; 637 buf[count] = 0;
638 return strdup(buf); 638 return strdup(buf);
639#else
640 return NULL;
641 (void)link;
642#endif
639} 643}
640 644
641EAPI Eina_List * 645EAPI Eina_List *