diff --git a/lib/client/operation.js b/lib/client/operation.js index b9cdcff9..8c48f9a1 100644 --- a/lib/client/operation.js +++ b/lib/client/operation.js @@ -290,7 +290,7 @@ query = '?files', Info = DOM.CurrentInfo, path = Info.dirPath, - current = Info.element; + name = Info.name; showLoad(); @@ -305,13 +305,16 @@ deleteFn(path + query, names, function(error) { var Storage = DOM.Storage, - dirPath = Info.dirPath; + dirPath = Info.dirPath, + delCurrent = DOM.deleteCurrent, + delSelected = DOM.deleteSelected, + getByName = DOM.getCurrentByName; if (!error) { if (n > 1) - DOM.deleteSelected(files); + delSelected(files); else - DOM.deleteCurrent(current); + delCurrent(getByName(name)); Storage.removeMatch(dirPath); }