stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5

commit d4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5
Author: Stefan Schmidt <s.schm...@samsung.com>
Date:   Fri Apr 17 15:03:28 2020 +0200

    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 <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D11727
---
 src/bin/exactness/player.c | 10 +++++-----
 1 file 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
           {

-- 


Reply via email to