]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Move calling get_list_settings() out of storage-specific autodetect()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 27 Oct 2023 11:49:13 +0000 (14:49 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:10 +0000 (12:34 +0200)
src/lib-storage/index/dbox-multi/mdbox-storage.c
src/lib-storage/index/dbox-single/sdbox-storage.c
src/lib-storage/index/maildir/maildir-storage.c
src/lib-storage/index/mbox/mbox-storage.c
src/lib-storage/mail-storage.c

index 4278c95bb894f7c1ccf3a35e108d1447c64a6f7c..6541b463edaec83de662cd48f0c7b98fc360b5da 100644 (file)
@@ -145,7 +145,6 @@ static bool mdbox_storage_autodetect(const struct mail_namespace *ns,
        }
 
        set->root_dir = root_dir;
-       dbox_storage_get_list_settings(ns, set);
        return TRUE;
 }
 
index b361657f55e8764c356c6c25ce79e52ed3145315..6fc156f3144ea4c8b95de82f2b6b14341e74bc51 100644 (file)
@@ -109,7 +109,6 @@ static bool sdbox_storage_autodetect(const struct mail_namespace *ns,
        }
 
        set->root_dir = root_dir;
-       dbox_storage_get_list_settings(ns, set);
        return TRUE;
 }
 
index abddcb27fb37bdf9acb31773c96d8c99f7f4facf..aef74bf0ae33965d9eef93d83d95ac13309e9e3b 100644 (file)
@@ -159,7 +159,6 @@ static bool maildir_storage_autodetect(const struct mail_namespace *ns,
        }
 
        set->root_dir = root_dir;
-       maildir_storage_get_list_settings(ns, set);
        return TRUE;
 }
 
index fc7e565973c66894c520d734b4d30b77807189a0..e7ea8b5e2ea6250ad0a51cf499e1a73dd36df94f 100644 (file)
@@ -356,8 +356,6 @@ static bool mbox_storage_autodetect(const struct mail_namespace *ns,
        }
        set->root_dir = root_dir;
        set->inbox_path = inbox_path;
-
-       mbox_storage_get_list_settings(ns, set);
        return TRUE;
 }
 
index 3b37a69eecdaa1b8d4d49830815601260e324534..67af802db2249ed1e350e71d62620107cf4bb81d 100644 (file)
@@ -218,10 +218,8 @@ mail_storage_get_class(struct mail_namespace *ns, const char *driver,
                }
        }
 
-       if (storage_class != NULL) {
-               storage_class->v.get_list_settings(ns, list_set);
+       if (storage_class != NULL)
                return storage_class;
-       }
 
        storage_class = mail_storage_autodetect(ns, list_set);
        if (storage_class != NULL)
@@ -384,6 +382,8 @@ mail_storage_create_real(struct mail_namespace *ns, struct event *set_event,
        settings_free(mail_set);
        if (storage_class == NULL)
                return -1;
+
+       storage_class->v.get_list_settings(ns, &list_set);
        i_assert(list_set.layout != NULL);
 
        if (ns->list == NULL) {