forked from enlightenment/enlightenment
do not shortcut access of Efreet_Desktop->x hash in fileman
this subverts thread safety and also (now) avoids return data validation fix T3096
This commit is contained in:
parent
85d7c121bd
commit
6d45baa510
|
@ -1147,7 +1147,7 @@ _e_fwin_custom_file_path_eval(E_Fwin *fwin,
|
||||||
const char *res, *ret = NULL;
|
const char *res, *ret = NULL;
|
||||||
|
|
||||||
/* get a X-something custom tage from the .desktop for the dir */
|
/* 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 */
|
/* free the old path */
|
||||||
if (prev_path) eina_stringshare_del(prev_path);
|
if (prev_path) eina_stringshare_del(prev_path);
|
||||||
/* if there was no key found - return NULL */
|
/* 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 */
|
/* it's a full path */
|
||||||
if (res[0] == '/')
|
if (res[0] == '/')
|
||||||
ret = eina_stringshare_add(res);
|
return res;
|
||||||
/* relative path to the dir */
|
/* relative path to the dir */
|
||||||
else
|
snprintf(buf, sizeof(buf), "%s/%s",
|
||||||
{
|
e_fm2_real_path_get(fwin->cur_page->fm_obj), res);
|
||||||
snprintf(buf, sizeof(buf), "%s/%s",
|
ret = eina_stringshare_add(buf);
|
||||||
e_fm2_real_path_get(fwin->cur_page->fm_obj), res);
|
eina_stringshare_del(res);
|
||||||
ret = eina_stringshare_add(buf);
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue