From d2168532529081d77c4662a4d3f067c639860e57 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 19 Dec 2013 14:56:34 -0500 Subject: [PATCH] when rolling back an efm_op task, also remove children tasks this simplifies/fixes the case where copying directories and canceling the operation would not correctly propagate the cancel to subtasks (contents of the directory) T680 --- src/bin/e_fm_op.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/bin/e_fm_op.c b/src/bin/e_fm_op.c index 88b15d77d..f7fd78b60 100644 --- a/src/bin/e_fm_op.c +++ b/src/bin/e_fm_op.c @@ -975,9 +975,26 @@ static void _e_fm_op_rollback(E_Fm_Op_Task *task) { E_Fm_Op_Copy_Data *data; + E_Fm_Op_Task *t; + Eina_List *l, *ll; if (!task) return; + EINA_LIST_FOREACH_SAFE(_e_fm_op_scan_queue, l, ll, t) + { + if (t == task) continue; + if (t->parent != task) continue; + _e_fm_op_scan_queue = eina_list_remove_list(_e_fm_op_scan_queue, l); + _e_fm_op_task_free(t); + } + EINA_LIST_FOREACH_SAFE(_e_fm_op_work_queue, l, ll, t) + { + if (t == task) continue; + if (t->parent != task) continue; + _e_fm_op_work_queue = eina_list_remove_list(_e_fm_op_work_queue, l); + _e_fm_op_task_free(t); + } + if (task->type == E_FM_OP_COPY) { data = task->data;