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)
downloadefl-d4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5.tar.gz
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)
if (!strcmp(_dest + strlen(_dest) - 4,".exu"))
{
_dest_type = FTYPE_EXU;
- /* Cut path at the beginning of the file name */
- char *file_start = strrchr(dest, '/');
- *file_start = '\0';
+ char *path = ecore_file_dir_get(dest);
- if (!ecore_file_mkpath(dest))
+ if (!ecore_file_mkpath(path))
{
- fprintf(stderr, "Path for %s cannot be created\n", dest);
+ fprintf(stderr, "Path for %s cannot be created\n", _dest);
+ free(path);
return EINA_FALSE;
}
+ free(path);
}
else
{