VMM/mailbox: Use the correct mailbox hierarchy separator in
Mailbox.add_boxes() for mdbox and sdbox mailbox format.
--- a/VirtualMailManager/mailbox.py Tue Feb 22 20:41:16 2011 +0000
+++ b/VirtualMailManager/mailbox.py Tue Feb 22 22:29:58 2011 +0000
@@ -128,7 +128,7 @@
name.startswith('../'):
bad.append(name)
return
- if '/' in name or '..' in name:
+ elif '/' in name or '..' in name:
bad.append(name)
return
if not self.__class__._box_name_re.match(name):
@@ -155,6 +155,8 @@
good = set()
bad = []
for box in mailboxes:
+ if self._sep == '/':
+ box = box.replace('.', self._sep)
self._validate_box_name(box, good, bad)
self._add_boxes(good, subscribe)
return bad