aboutsummaryrefslogtreecommitdiffstats
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
parentelm: fix memleak in combobox (diff)
downloadefl-0a068ac549e0dbdc27fec5925a99934ec09d9855.tar.gz
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)
if (!file->file)
return NULL;
- return basename((char *)eina_file_filename_get(file->file));
+ return ecore_file_file_get(eina_file_filename_get(file->file));
}
EAPI 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)
file = elm_code_file_open(code, path);
realpath(path, real);
- ck_assert_str_eq(basename(path), elm_code_file_filename_get(file));
+ ck_assert_str_eq(ecore_file_file_get(path), elm_code_file_filename_get(file));
ck_assert_str_eq(real, elm_code_file_path_get(file));
elm_code_file_close(file);
elm_code_free(code);