From bd6265e47c7aeb74fd2e82b61cd2e4aec6b890fc Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 29 May 2018 11:53:15 +0300 Subject: [PATCH] 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 --- src/lib-storage/index/pop3c/pop3c-storage.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib-storage/index/pop3c/pop3c-storage.c b/src/lib-storage/index/pop3c/pop3c-storage.c index dc2a4e4f91..c6f847977f 100644 --- a/src/lib-storage/index/pop3c/pop3c-storage.c +++ b/src/lib-storage/index/pop3c/pop3c-storage.c @@ -92,18 +92,15 @@ pop3c_client_create_from_set(struct mail_storage *storage, } 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); } } @@ -120,6 +117,7 @@ pop3c_mailbox_alloc(struct mail_storage *storage, struct mailbox_list *list, 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 = POP3C_STORAGE(storage);