summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J Stevens <paul@nfg.nl>2009-01-05 15:03:57 +0100
committerPaul J Stevens <paul@nfg.nl>2009-01-05 15:06:00 +0100
commit4198e041af8e5d2356ca2a9fb30a6a41e4f80b6c (patch)
tree0e4b79568c976185183eedc4e0500a72f573dffa
parent018ab6d4a6ac8bf2739833618a4f2894d6502ef0 (diff)
backport an additional fix for #725 and bump versionv2.2.11-rc4
-rw-r--r--VERSION2
-rw-r--r--imapcommands.c55
2 files changed, 29 insertions, 28 deletions
diff --git a/VERSION b/VERSION
index 2ff281ce..7d841b2d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.11-rc3
+2.2.11-rc4
diff --git a/imapcommands.c b/imapcommands.c
index f3071a72..202098b6 100644
--- a/imapcommands.c
+++ b/imapcommands.c
@@ -744,35 +744,36 @@ int _ic_list(struct ImapSession *self)
continue;
/* Enforce match of mailbox to pattern. */
- if ((! listex_match(pattern, mb->name, MAILBOX_SEPARATOR, 0)) && (g_str_has_suffix(pattern,"%"))) {
- /*
- If the "%" wildcard is the last character of a mailbox name argument, matching levels
- of hierarchy are also returned. If these levels of hierarchy are not also selectable
- mailboxes, they are returned with the \Noselect mailbox name attribute
- */
-
- TRACE(TRACE_DEBUG, "mailbox [%s] doesn't match pattern [%s]", mb->name, pattern);
- char *m = NULL, **p = g_strsplit(mb->name,MAILBOX_SEPARATOR,0);
-
- int l = g_strv_length(p);
- while (l-- > 1) {
- if (p[l]) {
- g_free(p[l]);
- p[l] = NULL;
+ if (! listex_match(pattern, mb->name, MAILBOX_SEPARATOR, 0)) {
+ if (g_str_has_suffix(pattern,"%")) {
+ /*
+ If the "%" wildcard is the last character of a mailbox name argument, matching levels
+ of hierarchy are also returned. If these levels of hierarchy are not also selectable
+ mailboxes, they are returned with the \Noselect mailbox name attribute
+ */
+
+ TRACE(TRACE_DEBUG, "mailbox [%s] doesn't match pattern [%s]", mb->name, pattern);
+ char *m = NULL, **p = g_strsplit(mb->name,MAILBOX_SEPARATOR,0);
+ int l = g_strv_length(p);
+ while (l-- > 1) {
+ if (p[l]) {
+ g_free(p[l]);
+ p[l] = NULL;
+ }
+ m = g_strjoinv(MAILBOX_SEPARATOR,p);
+
+ if (listex_match(pattern, m, MAILBOX_SEPARATOR, 0)) {
+ g_free(mb->name);
+ mb->name = m;
+ mb->no_select = 1;
+ mb->no_children = 0;
+ show = TRUE;
+ break;
+ }
+ g_free(m);
}
- m = g_strjoinv(MAILBOX_SEPARATOR,p);
-
- if (listex_match(pattern, m, MAILBOX_SEPARATOR, 0)) {
- g_free(mb->name);
- mb->name = m;
- mb->no_select = 1;
- mb->no_children = 0;
- show = TRUE;
- break;
- }
- g_free(m);
+ g_strfreev(p);
}
- g_strfreev(p);
} else {
show = TRUE;
}