]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
When :MAILBOXDIR= was empty, we might have appended extra '/' to it, which caused...
authorTimo Sirainen <tss@iki.fi>
Fri, 1 May 2009 00:00:17 +0000 (20:00 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 1 May 2009 00:00:17 +0000 (20:00 -0400)
--HG--
branch : HEAD

src/lib-storage/mailbox-list.c

index aee4c1946e9db6cb399582c9350cef5e8641b5e4..cbd4eb83281ecb1e97e5594859f77c6e5804f59b 100644 (file)
@@ -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 =