Fix the trash button in toolbar not always working

This commit is contained in:
yflory
2017-02-14 10:56:38 +01:00
parent aae3fba284
commit 92050eb04f
3 changed files with 6 additions and 1 deletions

View File

@@ -698,6 +698,7 @@ define([
var forgetPad = exp.forgetPad = function (href) {
if (workgroup) { return; }
if (!href) { return; }
var rootFiles = getRootFiles().slice();
if (rootFiles.indexOf(href) !== -1) {
removeFileFromRoot(files[ROOT], href);
@@ -712,6 +713,7 @@ define([
var addUnsortedPad = exp.addPad = function (href, path, name) {
if (workgroup) { return; }
if (!href) { return; }
var unsortedFiles = getUnsortedFiles();
var rootFiles = getRootFiles();
var trashFiles = getTrashFiles();