This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit c13556db0301697e3ce97af8e940757951703e27 Author: Benoit Tellier <[email protected]> AuthorDate: Fri Dec 6 11:37:47 2019 +0700 MAILBOX-393 Make JMAP Mailbox deletion rename proof --- .../james/jmap/draft/methods/SetMailboxesDestructionProcessor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/SetMailboxesDestructionProcessor.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/SetMailboxesDestructionProcessor.java index 5c2951e..575597a 100644 --- a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/SetMailboxesDestructionProcessor.java +++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/SetMailboxesDestructionProcessor.java @@ -116,9 +116,8 @@ public class SetMailboxesDestructionProcessor implements SetMailboxesProcessor { Mailbox mailbox = entry.getValue(); preconditions(mailbox, mailboxSession); - MailboxPath mailboxPath = mailboxManager.getMailbox(mailbox.getId(), mailboxSession).getMailboxPath(); - mailboxManager.deleteMailbox(mailboxPath, mailboxSession); - subscriptionManager.unsubscribe(mailboxSession, mailboxPath.getName()); + MailboxPath deletedMailbox = mailboxManager.deleteMailbox(mailbox.getId(), mailboxSession).generateAssociatedPath(); + subscriptionManager.unsubscribe(mailboxSession, deletedMailbox.getName()); builder.destroyed(entry.getKey()); } catch (MailboxHasChildException e) { builder.notDestroyed(entry.getKey(), SetError.builder() --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
