From: Timo Sirainen Date: Fri, 1 May 2009 00:00:17 +0000 (-0400) Subject: When :MAILBOXDIR= was empty, we might have appended extra '/' to it, which caused... X-Git-Tag: 2.0.alpha1~863 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff26037994e5d77049aba7434dbe138f6474504c;p=thirdparty%2Fdovecot%2Fcore.git When :MAILBOXDIR= was empty, we might have appended extra '/' to it, which caused problems. --HG-- branch : HEAD --- diff --git a/src/lib-storage/mailbox-list.c b/src/lib-storage/mailbox-list.c index aee4c1946e..cbd4eb8328 100644 --- a/src/lib-storage/mailbox-list.c +++ b/src/lib-storage/mailbox-list.c @@ -182,13 +182,6 @@ int mailbox_list_settings_parse(const char *data, 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_list *list, struct mail_namespace *ns, 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 =