]> 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)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 23 Jan 2018 07:53:20 +0000 (09:53 +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 326131e88006cdb662754db6d1e9a5fba3e59ee8..64c3dd761cae8534d649913d54512819078ec691 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;
                }