summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-12-31 15:28:23 +0000
committerAndy Williams <andy@andywilliams.me>2017-12-31 15:28:23 +0000
commit0a068ac549e0dbdc27fec5925a99934ec09d9855 (patch)
treee7a892ee45bbbeca6c0b3543372fe25a93bc9598
parent541d6527face44f372966054d11a0f6fadf6ee75 (diff)
elm_code: Fix usage of basename
-rw-r--r--src/lib/elementary/elm_code_file.c2
-rw-r--r--src/tests/elementary/elm_code_file_test_load.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_code_file.c b/src/lib/elementary/elm_code_file.c
index 1094929f1a..32b32a3449 100644
--- a/src/lib/elementary/elm_code_file.c
+++ b/src/lib/elementary/elm_code_file.c
@@ -75,7 +75,7 @@ EAPI const char *elm_code_file_filename_get(Elm_Code_File *file)
75 if (!file->file) 75 if (!file->file)
76 return NULL; 76 return NULL;
77 77
78 return basename((char *)eina_file_filename_get(file->file)); 78 return ecore_file_file_get(eina_file_filename_get(file->file));
79} 79}
80 80
81EAPI const char *elm_code_file_path_get(Elm_Code_File *file) 81EAPI const char *elm_code_file_path_get(Elm_Code_File *file)
diff --git a/src/tests/elementary/elm_code_file_test_load.c b/src/tests/elementary/elm_code_file_test_load.c
index 7e21b235f1..30cd30e534 100644
--- a/src/tests/elementary/elm_code_file_test_load.c
+++ b/src/tests/elementary/elm_code_file_test_load.c
@@ -19,7 +19,7 @@ START_TEST (elm_code_file_load)
19 file = elm_code_file_open(code, path); 19 file = elm_code_file_open(code, path);
20 realpath(path, real); 20 realpath(path, real);
21 21
22 ck_assert_str_eq(basename(path), elm_code_file_filename_get(file)); 22 ck_assert_str_eq(ecore_file_file_get(path), elm_code_file_filename_get(file));
23 ck_assert_str_eq(real, elm_code_file_path_get(file)); 23 ck_assert_str_eq(real, elm_code_file_path_get(file));
24 elm_code_file_close(file); 24 elm_code_file_close(file);
25 elm_code_free(code); 25 elm_code_free(code);