summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/account.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/imap/account.py')
-rw-r--r--src/leap/mail/imap/account.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/mail/imap/account.py b/src/leap/mail/imap/account.py
index dfc0d62..8a6e87e 100644
--- a/src/leap/mail/imap/account.py
+++ b/src/leap/mail/imap/account.py
@@ -330,8 +330,7 @@ class IMAPAccount(object):
oldname = normalize_mailbox(oldname)
newname = normalize_mailbox(newname)
- def rename_inferiors(inferiors_result):
- inferiors, mailboxes = inferiors_result
+ def rename_inferiors((inferiors, mailboxes)):
rename_deferreds = []
inferiors = [
(o, o.replace(oldname, newname, 1)) for o in inferiors]
@@ -347,7 +346,10 @@ class IMAPAccount(object):
d1 = defer.gatherResults(rename_deferreds, consumeErrors=True)
return d1
- d = self._inferiorNames(oldname)
+ d1 = self._inferiorNames(oldname)
+ d2 = self.account.list_all_mailbox_names()
+
+ d = defer.gatherResults([d1, d2])
d.addCallback(rename_inferiors)
return d