Fixed some potential issues with getting the trash folder handle, and made some minor improvements to index class methods

This commit is contained in:
Veronica K. B. Olsen
2020-09-30 21:50:59 +02:00
parent d382e70d72
commit 6fc5dad938
3 changed files with 27 additions and 28 deletions
+7
View File
@@ -213,6 +213,13 @@ class NWTree():
return self._trashRoot
return None
def isTrashRoot(self, tHandle):
"""Check if a handle is the trash folder.
"""
if self._trashRoot is None:
return False
return tHandle == self._trashRoot
def archiveRoot(self):
"""Returns the handle of the archive folder, or None if there
isn't one.