dovecot-2.2: lib-storage: Fixed mailbox_exists() for LAYOUT=index.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 24 16:30:49 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/6fa779e1d663
changeset: 15674:6fa779e1d663
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 24 16:30:33 2013 +0200
description:
lib-storage: Fixed mailbox_exists() for LAYOUT=index.

diffstat:

 src/lib-storage/index/index-storage.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 4673af53e7e6 -r 6fa779e1d663 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Tue Jan 22 12:59:32 2013 +0200
+++ b/src/lib-storage/index/index-storage.c	Thu Jan 24 16:30:33 2013 +0200
@@ -163,13 +163,19 @@
 				      enum mailbox_existence *existence_r)
 {
 	struct stat st;
+	enum mail_error error;
 	const char *path, *path2;
 	int ret;
 
 	/* see if it's selectable */
 	ret = mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_MAILBOX, &path);
-	if (ret < 0)
-		return -1;
+	if (ret < 0) {
+		mailbox_list_get_last_error(box->list, &error);
+		if (error != MAIL_ERROR_NOTFOUND)
+			return -1;
+		*existence_r = MAILBOX_EXISTENCE_NONE;
+		return 0;
+	}
 	if (ret == 0) {
 		/* no mailboxes in this storage? */
 		*existence_r = MAILBOX_EXISTENCE_NONE;


More information about the dovecot-cvs mailing list