summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-23 15:39:17 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-23 15:39:17 +0100
commit8ae578674fdc0e72a0491a7b19274a4ce11f79b6 (patch)
treefa2ecec94111625a0fce9daa9170c0ef5032ba87 /pykolab/imap
parent3c531785caf90498c76e2bc2d58ca277048fb2ee (diff)
downloadpykolab-8ae578674fdc0e72a0491a7b19274a4ce11f79b6.tar.gz
Catch situations in which we have not gotten the appropriate separator yet
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/cyrus.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 9b291bf..02a49b4 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -122,6 +122,8 @@ class Cyrus(cyruslib.CYRUS):
imap = IMAP()
imap.connect(uri=uri)
+ if not self.SEP == self.separator:
+ self.separator = self.SEP
def login(self, *args, **kw):
"""
@@ -314,6 +316,9 @@ class Cyrus(cyruslib.CYRUS):
'domain': None
}
+ if len(mailfolder.split('/')) > 1:
+ self.separator = '/'
+
# Split off the virtual domain identifier, if any
if len(mailfolder.split('@')) > 1:
mbox['domain'] = mailfolder.split('@')[1]