diff options
-rw-r--r-- | src/lib/ecore_file/ecore_file.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index 07d247bea0..52d203e1c0 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | * FIXME: the following functions will certainly not work on Windows: | 31 | * FIXME: the following functions will certainly not work on Windows: |
32 | * ecore_file_file_get() | ||
33 | * ecore_file_app_exe_get() | 32 | * ecore_file_app_exe_get() |
34 | * ecore_file_escape_name() | 33 | * ecore_file_escape_name() |
35 | */ | 34 | */ |
@@ -773,6 +772,23 @@ ecore_file_file_get(const char *path) | |||
773 | char *result = NULL; | 772 | char *result = NULL; |
774 | 773 | ||
775 | if (!path) return NULL; | 774 | if (!path) return NULL; |
775 | |||
776 | #ifdef _WIN32 | ||
777 | { | ||
778 | char buf[MAX_PATH]; | ||
779 | |||
780 | memcpy(buf, path, strlen(path) + 1); | ||
781 | EVIL_PATH_SEP_UNIX_TO_WIN32(buf); | ||
782 | if ((result = strrchr(buf, '\\'))) | ||
783 | { | ||
784 | result++; | ||
785 | return path + (result - buf); | ||
786 | } | ||
787 | else | ||
788 | return path; | ||
789 | } | ||
790 | #endif | ||
791 | |||
776 | if ((result = strrchr(path, '/'))) result++; | 792 | if ((result = strrchr(path, '/'))) result++; |
777 | else result = (char *)path; | 793 | else result = (char *)path; |
778 | 794 | ||