diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index c711385b..03d676fb 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -2642,7 +2642,7 @@ void UBDocumentController::deleteDocumentsInFolderOlderThan(const QModelIndex &i if (documentProxy) { - if (documentProxy->lastUpdate() < QDateTime::currentDateTime().addDays(-days)) + if (documentProxy->lastUpdate().date() < QDateTime::currentDateTime().addDays(-days).date()) { UBPersistenceManager::persistenceManager()->deleteDocument(documentProxy); }