]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Assert unique_root_dir is set with MAIL_STORAGE_CLASS_FLAG_UNIQUE_ROOT
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Feb 2018 11:21:25 +0000 (13:21 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 20 Feb 2018 13:50:37 +0000 (15:50 +0200)
src/lib-storage/mail-storage.c

index 95594249e7b0496e41ccb8ca64bc4a3178af9c40..52317bb9a8b31091f81829e33dcc921192f25314 100644 (file)
@@ -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;