Fix error messages when emptying trash

This commit is contained in:
Veronica Berglyd Olsen
2022-04-23 21:41:14 +02:00
parent 9bc7250532
commit bb53b2530c
+3 -3
View File
@@ -404,7 +404,7 @@ class GuiProjectTree(QTreeWidget):
return False return False
logger.verbose("Deleting %d file(s) from Trash", nTrash) logger.verbose("Deleting %d file(s) from Trash", nTrash)
for tHandle in self.getTreeFromHandle(trashHandle): for tHandle in reversed(self.getTreeFromHandle(trashHandle)):
if tHandle == trashHandle: if tHandle == trashHandle:
continue continue
self.deleteItem(tHandle, alreadyAsked=True, bulkAction=True) self.deleteItem(tHandle, alreadyAsked=True, bulkAction=True)
@@ -418,8 +418,8 @@ class GuiProjectTree(QTreeWidget):
"""Delete an item from the project tree. As a first step, files are """Delete an item from the project tree. As a first step, files are
moved to the Trash folder. Permanent deletion is a second step. This moved to the Trash folder. Permanent deletion is a second step. This
second step also deletes the item from the project object as well as second step also deletes the item from the project object as well as
delete the files on disk. Folders are deleted if they're empty only, delete the files on disk. Root folders are deleted if they're empty
and the deletion is always permanent. only, and the deletion is always permanent.
""" """
if not self.theParent.hasProject: if not self.theParent.hasProject:
logger.error("No project open") logger.error("No project open")