dovecot-1.2: dbox/mbox: Don't auto-create INBOX if storage isn't...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 1 16:04:28 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/9d7c0ff9c2a0
changeset: 8374:9d7c0ff9c2a0
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 01 16:04:24 2008 +0200
description:
dbox/mbox: Don't auto-create INBOX if storage isn't in the INBOX namespace.
diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
src/lib-storage/index/dbox/dbox-storage.c | 3 ++-
src/lib-storage/index/mbox/mbox-storage.c | 3 ++-
diffs (26 lines):
diff -r 9524ec6e14fc -r 9d7c0ff9c2a0 src/lib-storage/index/dbox/dbox-storage.c
--- a/src/lib-storage/index/dbox/dbox-storage.c Sat Nov 01 15:12:14 2008 +0200
+++ b/src/lib-storage/index/dbox/dbox-storage.c Sat Nov 01 16:04:24 2008 +0200
@@ -291,7 +291,8 @@ dbox_mailbox_open(struct mail_storage *_
if (dbox_cleanup_if_exists(_storage, path))
return dbox_open(storage, name, flags);
else if (errno == ENOENT) {
- if (strcmp(name, "INBOX") == 0) {
+ if (strcmp(name, "INBOX") == 0 &&
+ (_storage->ns->flags & NAMESPACE_FLAG_INBOX) != 0) {
/* INBOX always exists, create it */
if (create_dbox(_storage, path) < 0)
return NULL;
diff -r 9524ec6e14fc -r 9d7c0ff9c2a0 src/lib-storage/index/mbox/mbox-storage.c
--- a/src/lib-storage/index/mbox/mbox-storage.c Sat Nov 01 15:12:14 2008 +0200
+++ b/src/lib-storage/index/mbox/mbox-storage.c Sat Nov 01 16:04:24 2008 +0200
@@ -666,7 +666,8 @@ mbox_mailbox_open(struct mail_storage *_
if (input != NULL)
return mbox_mailbox_open_stream(storage, name, input, flags);
- if (strcmp(name, "INBOX") == 0) {
+ if (strcmp(name, "INBOX") == 0 &&
+ (_storage->ns->flags & NAMESPACE_FLAG_INBOX) != 0) {
/* make sure INBOX exists */
if (verify_inbox(_storage) < 0)
return NULL;
More information about the dovecot-cvs
mailing list