From 035a63f19ed3f35fdbea264f5aae59cf74828d53 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 24 May 2019 18:02:34 +0300 Subject: [PATCH] fix(cloudcmd) copy --- client/modules/operation/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index 875f3ddb..ff913638 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -335,7 +335,7 @@ function deleteSilent(files = DOM.getActiveFiles()) { * @param data * @param operation */ -function _processFiles(options, data) { +async function _processFiles(options, data) { let selFiles; let files; let panel; @@ -382,10 +382,12 @@ function _processFiles(options, data) { const operation = isCopy ? copyFn : moveFn; if (shouldAsk && config(option)) { - const [cancel, to] = message(title, to, names.map(encode)); + const [cancel, newTo] = await prompt(title, to, names.map(encode)); if (!cancel) - ask(to); + ask(newTo); + + return; } ask(to); @@ -496,7 +498,7 @@ function twopack(operation, type) { }); } -async function message(msg, to, names) { +async function prompt(msg, to, names) { const n = names.length; const [name] = names;