From: Timo Sirainen Date: Mon, 19 Feb 2018 11:21:25 +0000 (+0200) Subject: lib-storage: Assert unique_root_dir is set with MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT X-Git-Tag: 2.3.9~2242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41482f3838e68e7f818f5dfd10523161cf805f0e;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Assert unique_root_dir is set with MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 95594249e7..52317bb9a8 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -434,6 +434,8 @@ int mail_storage_create_full(struct mail_namespace *ns, const char *driver, hook_mail_storage_created(storage); } T_END; + i_assert(storage->unique_root_dir != NULL || + (storage->class_flags & MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT) == 0); DLLIST_PREPEND(&ns->user->storages, storage); mail_namespace_add_storage(ns, storage); *storage_r = storage;