From bf15897cc04ff17c1b0ca41f15e44f34d86d4209 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 10 Jun 2016 19:58:51 +0300 Subject: [PATCH] fix(operation) shift + delete: delete ".." directory --- lib/client/operation.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/client/operation.js b/lib/client/operation.js index 1c978f52..9c4fa245 100644 --- a/lib/client/operation.js +++ b/lib/client/operation.js @@ -273,11 +273,11 @@ } if (name === '..') - Dialog.alert.noFiles(TITLE); - else - Dialog.confirm(TITLE, msg, {cancel: false}).then(function() { - deleteSilent(files); - }); + return Dialog.alert.noFiles(TITLE); + + Dialog.confirm(TITLE, msg, {cancel: false}).then(function() { + deleteSilent(files); + }); } /** @@ -292,6 +292,9 @@ path = Info.dirPath, name = Info.name; + if (name === '..') + return Dialog.alert.noFiles(TITLE); + showLoad(); if (!files)