From 8f913a1ad5ec28de6b9894f0db61f283a1437f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Wed, 15 Jan 2020 09:23:52 +0100 Subject: [PATCH] delete documents in trash older than x days now won't delete documents x days old --- src/document/UBDocumentController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }