feature(cloudcmd) add --confirm-move

This commit is contained in:
coderaiser 2017-09-29 11:46:15 +03:00
parent 743b76d3ec
commit e5e8a566e2
8 changed files with 30 additions and 6 deletions

View file

@ -438,12 +438,13 @@ function OperationProto(operation, data) {
const {type} = options;
if (shouldAsk && config(type)) {
const isCopy = type === 'copy';
const title = isCopy ? 'Copy' : 'Rename/Move';
return message(title, to, names).then(ask);
}
const isCopy = type === 'copy';
const option = isCopy ? 'confirmCopy' : 'confirmMove';
const title = isCopy ? 'Copy' : 'Rename/Move';
if (shouldAsk && config(option))
return message(title, to, names)
.then(ask);
ask(to);