dovecot-2.2: lib-storage: mailbox_exists() now returns namespace...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:28 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/55586f4a86f1
changeset: 14348:55586f4a86f1
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 15 14:18:13 2012 +0200
description:
lib-storage: mailbox_exists() now returns namespace prefix as selectable if it is.
diffstat:
src/lib-storage/mail-storage.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diffs (36 lines):
diff -r 0b01fff98a04 -r 55586f4a86f1 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c Thu Mar 15 13:25:36 2012 +0200
+++ b/src/lib-storage/mail-storage.c Thu Mar 15 14:18:13 2012 +0200
@@ -749,20 +749,23 @@
return 0;
}
- if (!box->inbox_user &&
- have_listable_namespace_prefix(box->storage->user->namespaces,
- box->vname)) {
- /* listable namespace prefix always exists */
- *existence_r = MAILBOX_EXISTENCE_NOSELECT;
- return 0;
- }
-
if (auto_boxes && box->set != NULL && mailbox_is_autocreated(box)) {
*existence_r = MAILBOX_EXISTENCE_SELECT;
return 0;
}
- return box->v.exists(box, auto_boxes, existence_r);
+ if (box->v.exists(box, auto_boxes, existence_r) < 0)
+ return -1;
+
+ if (!box->inbox_user && *existence_r == MAILBOX_EXISTENCE_NOSELECT &&
+ have_listable_namespace_prefix(box->storage->user->namespaces,
+ box->vname)) {
+ /* listable namespace prefix always exists. */
+ *existence_r = MAILBOX_EXISTENCE_NOSELECT;
+ return 0;
+ }
+
+ return 0;
}
static int mailbox_check_mismatching_separators(struct mailbox *box)
More information about the dovecot-cvs
mailing list