]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_list_index_refresh() - Fix error handling when called many times...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 21 Mar 2025 19:30:12 +0000 (21:30 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Sat, 29 Mar 2025 14:32:10 +0000 (14:32 +0000)
The error could have been cleared out between the calls, so set the repeated
calls as internal failure.

src/lib-storage/list/mailbox-list-index.c

index 5f55a27cf8ca02705391fd8427d15fa29a0353d5..5865121bac1689d33de9e1bd3a4ff232d1d3eea8 100644 (file)
@@ -620,7 +620,10 @@ int mailbox_list_index_refresh(struct mailbox_list *list)
                   it. when we're accessing many mailboxes at once (e.g.
                   opening a virtual mailbox) we don't want to stat/read the
                   index every single time. */
-               return ilist->last_refresh_success ? 0 : -1;
+               if (ilist->last_refresh_success)
+                       return 0;
+               mailbox_list_set_internal_error(list);
+               return -1;
        }
 
        return mailbox_list_index_refresh_force(list);