From c2c9c3ab721db560f67a90f21cb7e7e1a75c8c96 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 19 Dec 2013 14:55:53 -0500 Subject: [PATCH] propagate parent tasks when creating work tasks from scan tasks --- src/bin/e_fm_op.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/bin/e_fm_op.c b/src/bin/e_fm_op.c index 47685962d..88b15d77d 100644 --- a/src/bin/e_fm_op.c +++ b/src/bin/e_fm_op.c @@ -1467,6 +1467,8 @@ _e_fm_op_scan_atom(E_Fm_Op_Task *task) if (task->type == E_FM_OP_COPY) { + Eina_List *l; + _e_fm_op_update_progress(NULL, 0, task->src.st.st_size); ctask = _e_fm_op_task_new(); @@ -1474,6 +1476,17 @@ _e_fm_op_scan_atom(E_Fm_Op_Task *task) memcpy(&(ctask->src.st), &(task->src.st), sizeof(struct stat)); if (task->dst.name) ctask->dst.name = eina_stringshare_add(task->dst.name); + if (task->parent) + ctask->parent = task->parent; + else + { + EINA_LIST_FOREACH(_e_fm_op_scan_queue, l, rtask) + if (rtask->parent == task) + rtask->parent = ctask; + EINA_LIST_FOREACH(_e_fm_op_work_queue, l, rtask) + if (rtask->parent == task) + rtask->parent = ctask; + } ctask->type = E_FM_OP_COPY; _e_fm_op_work_queue = eina_list_append(_e_fm_op_work_queue, ctask);