]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Remove early MAIL_STORAGE_CLASS_FLAG_NOQUOTA check
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 24 Aug 2024 05:37:38 +0000 (08:37 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:00 +0000 (10:40 +0200)
This is still checked later on. This early check caused problems, since
it could have triggered storage creation while namespaces were still
being added.

src/plugins/quota/quota.c

index 68dff7dc3aa51a6c89ff6785c32239a77b42ccd9..0d6d8799dfb6caf0803f02b574159632e617872e 100644 (file)
@@ -435,19 +435,6 @@ quota_is_duplicate_namespace(struct quota_root *root, struct mail_namespace *ns)
        return FALSE;
 }
 
-static bool quota_root_is_namespace_visible(struct mail_namespace *ns)
-{
-       struct mailbox_list *list = ns->list;
-       struct mail_storage *storage;
-
-       /* this check works as long as there is only one storage per list */
-       const char *vname = "";
-       if (mailbox_list_get_storage(&list, &vname, 0, &storage) == 0 &&
-           (storage->class_flags & MAIL_STORAGE_CLASS_FLAG_NOQUOTA) != 0)
-               return FALSE;
-       return TRUE;
-}
-
 void quota_add_user_namespace(struct quota *quota, const char *root_name,
                              struct mail_namespace *ns)
 {
@@ -462,8 +449,6 @@ void quota_add_user_namespace(struct quota *quota, const char *root_name,
                e_error(ns->list->event, "Quota root %s: %s", root_name, error);
                return;
        }
-       if (!quota_root_is_namespace_visible(ns))
-               return;
        /* first check if there already exists a namespace with the
           exact same path. we don't want to count them twice. */
        if (quota_is_duplicate_namespace(root, ns))