summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-16 12:28:37 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-16 12:29:47 +0200
commitdabfc90867c47a99ae57bcba12073e2a4dbc244f (patch)
treea82b5d1f132503d2678cd6618c0b2e57399d8b44 /pykolab/imap
parent54985158fb5d945801445cf1651758b8e3ff9636 (diff)
downloadpykolab-dabfc90867c47a99ae57bcba12073e2a4dbc244f.tar.gz
Escape the necessary spaces in verifying the folder to delete (#2298)
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/cyrus.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 9fa6feb..6034b48 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -376,7 +376,10 @@ class Cyrus(cyruslib.CYRUS):
if not mbox['domain'] == None:
verify_folder_search = "%s@%s" % (verify_folder_search, mbox['domain'])
- folders = self.lm(verify_folder_search)
+ if ' ' in verify_folder_search:
+ folders = self.lm('"%s"' % verify_folder_search)
+ else:
+ folders = self.lm(verify_folder_search)
# NOTE: Case also covered is valid hexadecimal folders; won't be the
# actual check as intended, but doesn't give you anyone else's data