forked from enlightenment/efl
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:
parent
bd7ccd45b6
commit
39f154f8ca
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue