summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-11-02 10:19:39 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2015-11-02 10:32:10 +0900
commit39f154f8ca18e26e8c1311e53eeaaf07325a6a6f (patch)
treefe723077b7f50b505a9bfee9e3c22c2dfa83bcf4
parentbd7ccd45b60998b61e9cd392c058006f800fc326 (diff)
downloadefl-39f154f8ca18e26e8c1311e53eeaaf07325a6a6f.tar.gz
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
-rw-r--r--src/lib/ecore_file/ecore_file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 3bb8b1e243..07d247bea0 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;
}