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
This commit is contained in:
Jaehyun Cho 2015-11-02 10:19:39 +09:00
parent bd7ccd45b6
commit 39f154f8ca
1 changed files with 10 additions and 0 deletions

View File

@ -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;
}