mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Cleanup raw message files for IMAP only
This commit is contained in:
parent
1c8e16f794
commit
b4f50d36d6
1 changed files with 5 additions and 2 deletions
|
@ -238,8 +238,11 @@ public class WorkerCleanup extends Worker {
|
|||
long id = Long.parseLong(file.getName().split("\\.")[0]);
|
||||
EntityMessage message = db.message().getMessage(id);
|
||||
if (manual && cleanup_attachments && message != null) {
|
||||
message.raw = false;
|
||||
db.message().setMessageRaw(message.id, message.raw);
|
||||
EntityAccount account = db.account().getAccount(message.account);
|
||||
if (account != null && account.protocol == EntityAccount.TYPE_IMAP) {
|
||||
message.raw = false;
|
||||
db.message().setMessageRaw(message.id, message.raw);
|
||||
}
|
||||
}
|
||||
if (message == null || message.raw == null || !message.raw) {
|
||||
Log.i("Deleting " + file);
|
||||
|
|
Loading…
Reference in a new issue