]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: No longer allow an empty MAILBOXDIR. Future code relies on this.
authorTimo Sirainen <tss@iki.fi>
Tue, 24 Mar 2009 21:10:29 +0000 (17:10 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 24 Mar 2009 21:10:29 +0000 (17:10 -0400)
--HG--
branch : HEAD

src/lib-storage/index/dbox/dbox-storage.c

index 18e1d54fee4a95d091d306b7255c2ba150d2bad7..6a67e2b06ef34f1317d35f27c92329412135515c 100644 (file)
@@ -530,6 +530,11 @@ dbox_list_delete_mailbox(struct mailbox_list *list, const char *name)
        if (storage->list_module_ctx.super.delete_mailbox(list, name) < 0)
                return -1;
 
+       if (*list_set->mailbox_dir_name == '\0') {
+               *error_r = "dbox: MAILBOXDIR must not be empty";
+               return -1;
+       }
+
        /* check if the mailbox actually exists */
        path = mailbox_list_get_path(list, name,
                                     MAILBOX_LIST_PATH_TYPE_MAILBOX);