projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd7ccd4
)
ecore_file: Fix ecore_file_file_get function on Windows.
author
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 2 Nov 2015 01:19:39 +0000
(10:19 +0900)
committer
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 2 Nov 2015 01:32:10 +0000
(10:32 +0900)
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
patch
|
blob
|
history
diff --git
a/src/lib/ecore_file/ecore_file.c
b/src/lib/ecore_file/ecore_file.c
index
3bb8b1e
..
07d247b
100644
(file)
--- 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;
}