dovecot-2.0: When :MAILBOXDIR= was empty, we might have appended...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 1 03:00:25 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/c0c4e6e75366
changeset: 9189:c0c4e6e75366
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 30 20:00:17 2009 -0400
description:
When :MAILBOXDIR= was empty, we might have appended extra '/' to it, which caused problems.

diffstat:

1 file changed, 1 insertion(+), 8 deletions(-)
src/lib-storage/mailbox-list.c |    9 +--------

diffs (26 lines):

diff -r 430eabd745a1 -r c0c4e6e75366 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Thu Apr 30 19:59:27 2009 -0400
+++ b/src/lib-storage/mailbox-list.c	Thu Apr 30 20:00:17 2009 -0400
@@ -182,13 +182,6 @@ int mailbox_list_settings_parse(const ch
 
 	if (set->index_dir != NULL && strcmp(set->index_dir, "MEMORY") == 0)
 		set->index_dir = "";
-
-	if (set->mailbox_dir_name == NULL)
-		set->mailbox_dir_name = "";
-	else if (set->mailbox_dir_name[strlen(set->mailbox_dir_name)-1] != '/') {
-		set->mailbox_dir_name =
-			t_strconcat(set->mailbox_dir_name, "/", NULL);
-	}
 	return 0;
 }
 
@@ -225,7 +218,7 @@ void mailbox_list_init(struct mailbox_li
 	list->set.mailbox_dir_name =
 		p_strdup(list->pool, set->mailbox_dir_name);
 
-	if (set->mailbox_dir_name == NULL)
+	if (set->mailbox_dir_name == NULL || *set->mailbox_dir_name == '\0')
 		list->set.mailbox_dir_name = "";
 	else if (set->mailbox_dir_name[strlen(set->mailbox_dir_name)-1] == '/') {
 		list->set.mailbox_dir_name =


More information about the dovecot-cvs mailing list