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
This commit is contained in:
Stefan Schmidt 2020-04-17 15:03:28 +02:00
parent 7452700618
commit d4c8bd4f4f
1 changed files with 5 additions and 5 deletions

View File

@ -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
{