fix(client) operation: move and copy not working (#358)

This commit is contained in:
coderaiser 2021-12-04 01:03:46 +02:00
parent d15134b272
commit bd5a8afdd5

View file

@ -82,7 +82,7 @@ function _authCheck(spawn, ok) {
const alertDialog = wraptile(Dialog.alert);
spawn.on('accept', accept(spawn));
spawn.on('reject', alertDialog ('Wrong credentials!'));
spawn.on('reject', alertDialog('Wrong credentials!'));
spawn.emit('auth', config('username'), config('password'));
}
@ -367,7 +367,7 @@ async function _processFiles(options, data) {
const operation = isCopy ? copyFn : moveFn;
if (shouldAsk && config(option)) {
const [cancel, newTo] = prompt(title, to, names.map(encode));
const [cancel, newTo] = await prompt(title, to, names.map(encode));
if (!cancel)
ask(newTo);
@ -483,7 +483,7 @@ function twopack(operation, type) {
});
}
function prompt(msg, to, names) {
async function prompt(msg, to, names) {
const n = names.length;
const [name] = names;
@ -496,7 +496,7 @@ function prompt(msg, to, names) {
msg += ' to';
return Dialog.prompt(msg, to);
return await Dialog.prompt(msg, to);
}
async function loadAll() {