]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fix importing keywords with MAIL_TRANSACTION_SYNC flag set
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Mar 2019 16:39:49 +0000 (18:39 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:01:54 +0000 (10:01 +0300)
Reading transaction logs was handled differently depending on the
MAIL_TRANSACTION_SYNC flag. The flag was set for all transactions written
by dsync.

So for example:
 * doveadm backup mdbox:/tmp/mdbox1 # keywords imported ok
 * doveadm -o mail=mdbox:/tmp/mdbox1 backup mdbox:/tmp/mdbox2 # keywords lost

src/doveadm/dsync/dsync-mailbox-import.c

index 39a694a08a474291fc18f366ebba9e3c757c17a6..98f54edb350fdc6e0e433fb5b9183d9a8a22f911 100644 (file)
@@ -2314,6 +2314,7 @@ dsync_mailbox_get_final_keywords(const struct dsync_mail_change *change)
        t_array_init(&keywords, count);
        for (i = 0; i < count; i++) {
                if (changes[i][0] == KEYWORD_CHANGE_ADD ||
+                   changes[i][0] == KEYWORD_CHANGE_FINAL ||
                    changes[i][0] == KEYWORD_CHANGE_ADD_AND_FINAL) {
                        const char *name = changes[i]+1;