Mercurial > dovecot > core-2.2
changeset 12905:a5f9264674fb
lib-storage: When mail_location is looked up from environment, set its unexpanded string properly.
This fixes a crash when creating index directories and mail location was
autodetected.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 23 Mar 2011 23:13:00 +0200 |
parents | d7a02077d91f |
children | 65f4791d0eb4 |
files | src/lib-storage/mail-namespace.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-namespace.c Wed Mar 23 22:16:24 2011 +0200 +++ b/src/lib-storage/mail-namespace.c Wed Mar 23 23:13:00 2011 +0200 @@ -4,6 +4,7 @@ #include "array.h" #include "str.h" #include "file-lock.h" +#include "settings-parser.h" #include "mailbox-list-private.h" #include "mail-storage-private.h" #include "mail-storage-settings.h" @@ -358,9 +359,11 @@ location_source = "environment MAILDIR"; } } - - if (unexpanded_inbox_set->location == NULL) - unexpanded_inbox_set->location = inbox_set->location; + if (*unexpanded_inbox_set->location == '\0') { + unexpanded_inbox_set->location = + p_strconcat(user->pool, SETTING_STRVAR_EXPANDED, + inbox_set->location, NULL); + } ns->set = inbox_set; ns->unexpanded_set = unexpanded_inbox_set;