From: Timo Sirainen Date: Tue, 24 Mar 2009 21:10:29 +0000 (-0400) Subject: dbox: No longer allow an empty MAILBOXDIR. Future code relies on this. X-Git-Tag: 2.0.alpha1~1038^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca341c60f3b530cc28c482a9d11f0f955db9b70c;p=thirdparty%2Fdovecot%2Fcore.git dbox: No longer allow an empty MAILBOXDIR. Future code relies on this. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox/dbox-storage.c b/src/lib-storage/index/dbox/dbox-storage.c index 18e1d54fee..6a67e2b06e 100644 --- a/src/lib-storage/index/dbox/dbox-storage.c +++ b/src/lib-storage/index/dbox/dbox-storage.c @@ -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);