forked from enlightenment/enlightenment
efm: bug fix in source icons finding logic on dnd
Summary: There were a few crash cases during drag and drop. - move file in Desktop using efm, - move file in same directory using differnt efm The root cause is icon finding logic. efm finds icons based on URI string. But, the found icon could be different with selected one since there could be multiple efm in same directory. Therefore, this patch filter out icon which is not selected icon. Fixes T1364 Test Plan: case 1. open efm -> goto desktop -> move file from ~/Desktop to ~/Desktop/folder case 2. open two efm -> goto same directory in two efm -> move file to {currentdirectory}/folder in any efm Reviewers: raster, zmike Subscribers: cedric, seoz Maniphest Tasks: T1364 Differential Revision: https://phab.enlightenment.org/D1331
This commit is contained in:
parent
c006bbf247
commit
b481c124c8
|
@ -4498,15 +4498,17 @@ _e_fm2_uri_icon_list_get(Eina_List *uri)
|
|||
Eina_List *fms;
|
||||
Evas_Object *fm;
|
||||
E_Fm2_Icon *ic;
|
||||
const char *file;
|
||||
|
||||
ic = NULL;
|
||||
fms = _e_fm2_file_fm2_find(path);
|
||||
if (!fms) continue;
|
||||
fm = eina_list_data_get(fms);
|
||||
eina_list_free(fms);
|
||||
file = ecore_file_file_get(path);
|
||||
ic = _e_fm2_icon_find(fm, file);
|
||||
ic = NULL;
|
||||
EINA_LIST_FREE(fms, fm)
|
||||
{
|
||||
ic = _e_fm2_icon_find(fm, ecore_file_file_get(path));
|
||||
if (!ic) continue;
|
||||
if (eina_list_data_find(ic->sd->selected_icons, ic)) break;
|
||||
ic = NULL;
|
||||
}
|
||||
icons = eina_list_append(icons, ic);
|
||||
}
|
||||
return icons;
|
||||
|
|
Loading…
Reference in New Issue