From f6152d2e5cf31fe37594b18ac27ab51459ca19c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Tue, 3 Dec 2019 15:09:56 +0100 Subject: [PATCH] don't try to delete the trashIndex itself --- src/core/UBApplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 60d8f26f..709aa678 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -455,7 +455,8 @@ void UBApplication::closing() { UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel; documentController->deleteDocumentsInFolderOlderThan(docModel->trashIndex(), UBSettings::settings()->emptyTrashDaysValue->get().toInt()); - documentController->deleteEmptyFolders(docModel->trashIndex()); + if (docModel->hasChildren(docModel->trashIndex())) + documentController->deleteEmptyFolders(docModel->trashIndex()); } if (boardController)