mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(operation) delete: check no files after ask
This commit is contained in:
parent
13495b8c63
commit
c2c66fb29f
1 changed files with 5 additions and 3 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue