dovecot-2.0: mailbox_list_get_mailbox_name_status(): Fixed INBOX...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 18 07:32:16 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/c0c4898fc803
changeset: 10747:c0c4898fc803
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 18 07:31:55 2010 +0200
description:
mailbox_list_get_mailbox_name_status(): Fixed INBOX handling with FS layout.
diffstat:
src/lib-storage/list/mailbox-list-fs.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 28c3486864f6 -r c0c4898fc803 src/lib-storage/list/mailbox-list-fs.c
--- a/src/lib-storage/list/mailbox-list-fs.c Thu Feb 18 07:13:29 2010 +0200
+++ b/src/lib-storage/list/mailbox-list-fs.c Thu Feb 18 07:31:55 2010 +0200
@@ -236,10 +236,15 @@
const char *path, *dir_path;
enum mailbox_info_flags flags;
+ if (strcmp(name, "INBOX") == 0 &&
+ (_list->ns->flags & NAMESPACE_FLAG_INBOX) != 0) {
+ *status = MAILBOX_NAME_EXISTS_MAILBOX;
+ return 0;
+ }
+
path = mailbox_list_get_path(_list, name,
MAILBOX_LIST_PATH_TYPE_MAILBOX);
-
- if (strcmp(name, "INBOX") == 0 || stat(path, &st) == 0) {
+ if (stat(path, &st) == 0) {
if (*_list->set.maildir_name != '\0' ||
_list->v.is_internal_name == NULL || !S_ISDIR(st.st_mode)) {
*status = MAILBOX_NAME_EXISTS_MAILBOX;
More information about the dovecot-cvs
mailing list