Commit f6152d2e authored by Clément Fauconnier's avatar Clément Fauconnier

don't try to delete the trashIndex itself

parent 6fb5b5bc
...@@ -455,7 +455,8 @@ void UBApplication::closing() ...@@ -455,7 +455,8 @@ void UBApplication::closing()
{ {
UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel; UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel;
documentController->deleteDocumentsInFolderOlderThan(docModel->trashIndex(), UBSettings::settings()->emptyTrashDaysValue->get().toInt()); documentController->deleteDocumentsInFolderOlderThan(docModel->trashIndex(), UBSettings::settings()->emptyTrashDaysValue->get().toInt());
documentController->deleteEmptyFolders(docModel->trashIndex()); if (docModel->hasChildren(docModel->trashIndex()))
documentController->deleteEmptyFolders(docModel->trashIndex());
} }
if (boardController) if (boardController)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment