From d2ab30734fed3b4774574f6abcf9ec43674dfe67 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 22 Feb 2021 18:20:39 +0100 Subject: [PATCH] Fixed cleanup cached images --- app/src/main/java/eu/faircode/email/WorkerCleanup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/WorkerCleanup.java b/app/src/main/java/eu/faircode/email/WorkerCleanup.java index bb6eb6f07c..43f2eaee72 100644 --- a/app/src/main/java/eu/faircode/email/WorkerCleanup.java +++ b/app/src/main/java/eu/faircode/email/WorkerCleanup.java @@ -257,7 +257,7 @@ public class WorkerCleanup extends Worker { if (images != null) for (File file : images) if (manual || file.lastModified() + KEEP_FILES_DURATION < now) { - long id = Long.parseLong(file.getName().split("_")[0]); + long id = Long.parseLong(file.getName().split("[_\\.]")[0]); EntityMessage message = db.message().getMessage(id); if (manual || message == null || file.lastModified() + KEEP_IMAGES_DURATION < now) {