discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=6d45baa5109b6781a8f2bf5310a9049970dd34d2

commit 6d45baa5109b6781a8f2bf5310a9049970dd34d2
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Jan 25 11:29:55 2016 -0500

    do not shortcut access of Efreet_Desktop->x hash in fileman
    
    this subverts thread safety and also (now) avoids return data validation
    
    fix T3096
---
 src/modules/fileman/e_fwin.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index 5087cdd..f6cf55f 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -1147,7 +1147,7 @@ _e_fwin_custom_file_path_eval(E_Fwin *fwin,
    const char *res, *ret = NULL;
 
    /* get a X-something custom tage from the .desktop for the dir */
-   res = eina_hash_find(ef->x, key);
+   res = efreet_desktop_x_field_get(ef, key);
    /* free the old path */
    if (prev_path) eina_stringshare_del(prev_path);
    /* if there was no key found - return NULL */
@@ -1155,14 +1155,12 @@ _e_fwin_custom_file_path_eval(E_Fwin *fwin,
 
    /* it's a full path */
    if (res[0] == '/')
-     ret = eina_stringshare_add(res);
+     return res;
    /* relative path to the dir */
-   else
-     {
-        snprintf(buf, sizeof(buf), "%s/%s",
-                 e_fm2_real_path_get(fwin->cur_page->fm_obj), res);
-        ret = eina_stringshare_add(buf);
-     }
+   snprintf(buf, sizeof(buf), "%s/%s",
+            e_fm2_real_path_get(fwin->cur_page->fm_obj), res);
+   ret = eina_stringshare_add(buf);
+   eina_stringshare_del(res);
    return ret;
 }
 

-- 


Reply via email to