Improve reliability of emptying trash

This commit is contained in:
luckyrat 2019-03-30 12:22:39 +00:00
parent 1a421a7b34
commit 400a0ab04f
1 changed files with 2 additions and 1 deletions

View File

@ -575,10 +575,11 @@ const FileModel = Backbone.Model.extend({
this.db.move(group, null);
modified = true;
}, this);
trashGroup.group.entries.forEach(function(entry) {
trashGroup.group.entries.slice().forEach(function(entry) {
this.db.move(entry, null);
modified = true;
}, this);
trashGroup.get('items').reset();
trashGroup.get('entries').reset();
if (modified) {
this.setModified();