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
This commit is contained in:
Mike Blumenkrantz 2013-12-19 14:56:34 -05:00
parent c2c9c3ab72
commit d216853252
1 changed files with 17 additions and 0 deletions

View File

@ -975,9 +975,26 @@ static void
_e_fm_op_rollback(E_Fm_Op_Task *task) _e_fm_op_rollback(E_Fm_Op_Task *task)
{ {
E_Fm_Op_Copy_Data *data; E_Fm_Op_Copy_Data *data;
E_Fm_Op_Task *t;
Eina_List *l, *ll;
if (!task) return; 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) if (task->type == E_FM_OP_COPY)
{ {
data = task->data; data = task->data;