1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Fixed cleanup cached images

This commit is contained in:
M66B 2021-02-22 18:20:39 +01:00
parent eb4a218624
commit d2ab30734f

View file

@ -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) {