Fixed cleanup cached images

pull/194/head
M66B 4 years ago
parent eb4a218624
commit d2ab30734f

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

Loading…
Cancel
Save