summaryrefslogtreecommitdiffstats
path: root/pykolab
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:43 +0100
commit71bbac8d8f9ee0b4222a373c9c42b4d049dec1ee (patch)
tree37a645977595ab19a419d959336f48819eb7bf8c /pykolab
parentd0df0d50b680778ca75eb4f2d44469da6683691f (diff)
downloadpykolab-71bbac8d8f9ee0b4222a373c9c42b4d049dec1ee.tar.gz
Catch situations in which we have not gotten the appropriate separator yet
Diffstat (limited to 'pykolab')
-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]