Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6632:80419a82081f HEAD
Mailbox listing was broken if namespace had a prefix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 27 Oct 2007 22:42:33 +0300 |
parents | 0dd9b91fd52c |
children | 5d73517a9b98 |
files | src/lib-storage/list/mailbox-list-maildir-iter.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-maildir-iter.c Sat Oct 27 22:12:57 2007 +0300 +++ b/src/lib-storage/list/mailbox-list-maildir-iter.c Sat Oct 27 22:42:33 2007 +0300 @@ -57,8 +57,9 @@ if (imap_match(glob, mailbox_c) != IMAP_MATCH_YES) continue; - if (*ns_prefix != '\0' && - strncmp(mailbox_c, ns_prefix, ns_prefix_len - 1) == 0) { + if (*ns_prefix != '\0' && str_len(mailbox) == ns_prefix_len-1 && + strncmp(mailbox_c, ns_prefix, ns_prefix_len - 1) == 0 && + mailbox_c[ns_prefix_len-1] == hierarchy_sep) { /* don't return matches to namespace prefix itself */ continue; }