]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Fix removal of forced cache decisions from existing cache files
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 22 Jan 2018 22:04:28 +0000 (00:04 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 29 Jan 2018 13:21:40 +0000 (15:21 +0200)
The forced-flags are written to the cache file when the file is created.
They were also read back, and the force-flag was preserved even when the
configuration was removed.

src/lib-index/mail-cache-fields.c

index acb8e75bfa4546ae637accd6ca126719a982a307..72d24270be7a165cf1db8e1727cd6fd6f17a0bf8 100644 (file)
@@ -411,7 +411,7 @@ int mail_cache_header_fields_read(struct mail_cache *cache)
                        field.name = names;
                        field.type = types[i];
                        field.field_size = sizes[i];
-                       field.decision = decisions[i];
+                       field.decision = decisions[i] & ~MAIL_CACHE_DECISION_FORCED;
                        mail_cache_register_fields(cache, &field, 1);
                        fidx = field.idx;
                }