You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/12/13 10:01:08 UTC
[james-project] 03/17: MAILBOX-393 Make JMAP Mailbox deletion
rename proof
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 <bt...@linagora.com>
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org