diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-07-06 11:06:48 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-07-06 11:06:48 +0100 |
commit | c59e6fcb4649436427cdecb14b2bfb12e1a143b0 (patch) | |
tree | 5c276731b6659a120e04b27cc14bb032aeaaffc5 | |
parent | b6e86aca4378144c38424f2f796913fd4ac2172c (diff) | |
download | pykolab-c59e6fcb4649436427cdecb14b2bfb12e1a143b0.tar.gz |
Use utf-7 names when deleting folders by wildcard match as well
-rw-r--r-- | pykolab/imap/cyrus.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py index f1f379d..ed3b29f 100644 --- a/pykolab/imap/cyrus.py +++ b/pykolab/imap/cyrus.py @@ -193,6 +193,14 @@ class Cyrus(cyruslib.CYRUS): return server + def folder_utf7(self, folder): + from pykolab import imap_utf7 + return imap_utf7.encode(folder) + + def folder_utf8(self, folder): + from pykolab import imap_utf7 + return imap_utf7.decode(folder) + def _setquota(self, mailfolder, quota): """ Login to the actual backend server. @@ -355,7 +363,7 @@ 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) + folders = self.lm(self.folder_utf7(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 |