Base folder needs to be represented by null, not %.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 17 Apr 2009 01:05:48 +0000 (19:05 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 17 Apr 2009 06:05:54 +0000 (00:05 -0600)
'%' is a valid mailbox char in IMAP, believe it or not (having one in your
mailbox name will prevent you from doing searches, but it is technically
valid).

imp/lib/Imap/Tree.php

index bc79114..09e251b 100644 (file)
@@ -39,8 +39,10 @@ class IMP_Imap_Tree
     const NEXT_SHOWCLOSED = 1;
     const NEXT_SHOWSUB = 2;
 
-    /* The string used to indicate the base of the tree. */
-    const BASE_ELT = '%';
+    /* The string used to indicate the base of the tree. This must be null
+     * since this is the only 7-bit character not allowed in IMAP
+     * mailboxes. */
+    const BASE_ELT = null;
 
     /* Defines used with the output from the build() function. */
     const SPECIAL_INBOX = 1;