diff options
author | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2015-11-02 10:19:39 +0900 |
---|---|---|
committer | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2015-11-02 10:32:10 +0900 |
commit | 39f154f8ca18e26e8c1311e53eeaaf07325a6a6f (patch) | |
tree | fe723077b7f50b505a9bfee9e3c22c2dfa83bcf4 /src | |
parent | bd7ccd45b60998b61e9cd392c058006f800fc326 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ecore_file/ecore_file.c | 10 |
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) | |||
775 | if (!path) return NULL; | 775 | if (!path) return NULL; |
776 | if ((result = strrchr(path, '/'))) result++; | 776 | if ((result = strrchr(path, '/'))) result++; |
777 | else result = (char *)path; | 777 | else result = (char *)path; |
778 | |||
779 | #ifdef _WIN32 | ||
780 | char *result_backslash = NULL; | ||
781 | if ((result_backslash = strrchr(path, '\\'))) | ||
782 | { | ||
783 | result_backslash++; | ||
784 | if (result_backslash > result) result = result_backslash; | ||
785 | } | ||
786 | #endif | ||
787 | |||
778 | return result; | 788 | return result; |
779 | } | 789 | } |
780 | 790 | ||