fix(operation) delete: check no files after ask

This commit is contained in:
coderaiser 2017-10-06 15:48:27 +03:00
parent 13495b8c63
commit c2c66fb29f

View file

@ -310,6 +310,11 @@ function OperationProto(operation, data) {
* @currentFile
*/
function promptDelete() {
let name = Info.name;
if (name === '..')
return Dialog.alert.noFiles(TITLE);
const msgAsk = 'Do you really want to delete the ';
const msgSel = 'selected ';
@ -341,9 +346,6 @@ function OperationProto(operation, data) {
msg = msgAsk + msgSel + type + name + '?';
}
if (name === '..')
return Dialog.alert.noFiles(TITLE);
const cancel = false;
Dialog.confirm(TITLE, msg, {cancel}).then(() => {