]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Use mail_index_reset_error() when opening index
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 20 Jan 2021 16:04:40 +0000 (18:04 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 3 May 2021 13:01:05 +0000 (13:01 +0000)
This resets the error more cleanly than changing nodiskspace directly.

src/lib-index/mail-index.c

index 51973a935e64ad091d8a7fd3d483d930a9791df8..1a0d730074d32eaddc828db041c63112c3545501 100644 (file)
@@ -686,8 +686,8 @@ int mail_index_open(struct mail_index *index, enum mail_index_open_flags flags)
                i_strdup("(in-memory index)") :
                i_strconcat(index->dir, "/", index->prefix, NULL);
 
+       mail_index_reset_error(index);
        index->readonly = FALSE;
-       index->nodiskspace = FALSE;
        index->log_sync_locked = FALSE;
        index->flags = flags;
        index->readonly = (flags & MAIL_INDEX_OPEN_FLAG_READONLY) != 0;