Mercurial > dovecot > core-2.2
changeset 22979:ace8424d6f65
pop3c: Ensure pop3c index directory is autocreated
Otherwise we might think that the box has been unexpectedly
autodeleted and pop3_migration will fail.
Broken by 91ee70ed04d33fecd7fc94621f236013d520d7b3
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 29 May 2018 11:53:15 +0300 |
parents | 91b975cdeb87 |
children | fed657e0b156 |
files | src/lib-storage/index/pop3c/pop3c-storage.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/pop3c/pop3c-storage.c Thu May 24 01:32:40 2018 +0300 +++ b/src/lib-storage/index/pop3c/pop3c-storage.c Tue May 29 11:53:15 2018 +0300 @@ -87,18 +87,15 @@ } static void -pop3c_storage_get_list_settings(const struct mail_namespace *ns, +pop3c_storage_get_list_settings(const struct mail_namespace *ns ATTR_UNUSED, struct mailbox_list_settings *set) { set->layout = MAILBOX_LIST_NAME_FS; if (set->root_dir != NULL && *set->root_dir != '\0' && set->index_dir == NULL) { - /* we don't really care about root_dir, but we - just need to get index_dir autocreated. - it happens when index_dir differs from root_dir. */ + /* we don't really care about root_dir, but we + just need to get index_dir autocreated. */ set->index_dir = set->root_dir; - set->root_dir = p_strconcat(ns->user->pool, - set->root_dir, "/.", NULL); } } @@ -115,6 +112,7 @@ mbox->box.pool = pool; mbox->box.storage = storage; mbox->box.list = list; + mbox->box.list->props |= MAILBOX_LIST_PROP_AUTOCREATE_DIRS; mbox->box.mail_vfuncs = &pop3c_mail_vfuncs; mbox->storage = (struct pop3c_storage *)storage;