From bc6d08e15e566f6ce8f2a6f7b2fad3276d0057a6 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 11 Feb 2019 13:52:42 +0000 Subject: [PATCH] Log reason for append/delete --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index f6a01bf6f7..76f1c93dd1 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1827,7 +1827,8 @@ public class ServiceSynchronize extends LifecycleService { throw new FolderNotFoundException(); IMAPFolder itarget = (IMAPFolder) istore.getFolder(target.name); - if (istore.hasCapability("MOVE") && + boolean canMove = istore.hasCapability("MOVE"); + if (canMove && !EntityFolder.DRAFTS.equals(folder.type) && !EntityFolder.DRAFTS.equals(target.type)) { // Autoread @@ -1839,7 +1840,8 @@ public class ServiceSynchronize extends LifecycleService { // Move message to ifolder.moveMessages(new Message[]{imessage}, itarget); } else { - Log.w(folder.name + " MOVE by DELETE/APPEND"); + Log.w(folder.name + " MOVE by DELETE/APPEND" + + " cap=" + canMove + " from=" + folder.type + " to=" + target.type); // Serialize source message ByteArrayOutputStream bos = new ByteArrayOutputStream();