mailbox_mkdir() looked up the root path via mailbox_list_get_root_forced()
only to pass it straight to mailbox_list_mkdir_root(). Let mkdir_root()
resolve the root itself by passing path=NULL, dropping the local variable.
Gbp-Pq: Name 0002-lib-storage-Simplify-mailbox_mkdir-using-mailbox_lis.patch
enum mailbox_list_path_type type)
{
const struct mailbox_permissions *perm = mailbox_get_permissions(box);
- const char *root_dir;
if (!perm->gid_origin_is_mailbox_path) {
/* mailbox root directory doesn't exist, create it */
- root_dir = mailbox_list_get_root_forced(box->list, type);
- if (mailbox_list_mkdir_root(box->list, root_dir, type) < 0) {
+ if (mailbox_list_mkdir_root(box->list, NULL, type) < 0) {
mail_storage_copy_list_error(box->storage, box->list);
return -1;
}