Mercurial > dovecot > core-2.2
changeset 12712:fc02e620204d
lib-storage: Give a better error message if mail_location has INBOX but no mail root dir.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 25 Jan 2011 00:32:50 +0200 |
parents | 3582271a897e |
children | 16ce45dbcb53 |
files | src/lib-storage/mailbox-list.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c Tue Jan 25 00:10:46 2011 +0200 +++ b/src/lib-storage/mailbox-list.c Tue Jan 25 00:32:50 2011 +0200 @@ -264,6 +264,12 @@ *error_r = t_strconcat(error, "mail root dir in: ", data, NULL); return -1; } + if (strncmp(set_r->root_dir, "INBOX=", 6) == 0) { + /* probably mbox user trying to avoid root_dir */ + *error_r = t_strconcat("Mail root directory not given: ", + data, NULL); + return -1; + } while (*tmp != NULL) { str = split_next_arg(&tmp);