summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-04-17 15:03:28 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-23 13:06:35 +0200
commitd4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5 (patch)
treea3d39d14a83cab0cd275d4a2f5171c89c862cb0b
parent745270061883d9047b90b4bb53084729d3c60d35 (diff)
exactness: use convinience ecore_file function to get dir
Instead of doing our own parsing here we should use ecore_file_dir_get() which uses dirname() already to solve this. CID: 1422196 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11727
-rw-r--r--src/bin/exactness/player.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index a3d6b04880..1e759e4c9b 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -883,15 +883,15 @@ _setup_dest_type(const char *dest, Eina_Bool external_injection)
883 if (!strcmp(_dest + strlen(_dest) - 4,".exu")) 883 if (!strcmp(_dest + strlen(_dest) - 4,".exu"))
884 { 884 {
885 _dest_type = FTYPE_EXU; 885 _dest_type = FTYPE_EXU;
886 /* Cut path at the beginning of the file name */ 886 char *path = ecore_file_dir_get(dest);
887 char *file_start = strrchr(dest, '/');
888 *file_start = '\0';
889 887
890 if (!ecore_file_mkpath(dest)) 888 if (!ecore_file_mkpath(path))
891 { 889 {
892 fprintf(stderr, "Path for %s cannot be created\n", dest); 890 fprintf(stderr, "Path for %s cannot be created\n", _dest);
891 free(path);
893 return EINA_FALSE; 892 return EINA_FALSE;
894 } 893 }
894 free(path);
895 } 895 }
896 else 896 else
897 { 897 {