discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=b481c124c8500211ad93ccbe0e9c0e72e337591e
commit b481c124c8500211ad93ccbe0e9c0e72e337591e Author: Wonguk Jeong <wonguk.je...@samsung.com> Date: Sun Aug 17 17:04:15 2014 -0400 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 --- src/bin/e_fm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 591c855..e896bf1 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -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; --