jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=39f154f8ca18e26e8c1311e53eeaaf07325a6a6f

commit 39f154f8ca18e26e8c1311e53eeaaf07325a6a6f
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Mon Nov 2 10:19:39 2015 +0900

    ecore_file: Fix ecore_file_file_get function on Windows.
    
    On Windows, both backslash and slash can be used as file path
    separators. Therefore, it is fixed to consider backslash as a file path
    separator as well on Windows.
    
    @fix
---
 src/lib/ecore_file/ecore_file.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 3bb8b1e..07d247b 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -775,6 +775,16 @@ ecore_file_file_get(const char *path)
    if (!path) return NULL;
    if ((result = strrchr(path, '/'))) result++;
    else result = (char *)path;
+
+#ifdef _WIN32
+   char *result_backslash = NULL;
+   if ((result_backslash = strrchr(path, '\\')))
+     {
+        result_backslash++;
+        if (result_backslash > result) result = result_backslash;
+     }
+#endif
+
    return result;
 }
 

-- 


Reply via email to