]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
sdbox: mailbox_update() could have changed UIDVALIDITY incorrectly.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Apr 2010 19:24:43 +0000 (22:24 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Apr 2010 19:24:43 +0000 (22:24 +0300)
--HG--
branch : HEAD

src/lib-storage/index/dbox-single/sdbox-storage.c

index 1c2e085d122939198ae91c0ac829b17177ead848..d0cfeb196444ef8cc483fe1352155d82a162f6d4 100644 (file)
@@ -120,7 +120,9 @@ static int sdbox_write_index_header(struct mailbox *box,
 
        if (update != NULL && update->uid_validity != 0)
                uid_validity = update->uid_validity;
-       else if (hdr->uid_validity == 0) {
+       else if (hdr->uid_validity != 0)
+               uid_validity = hdr->uid_validity;
+       else {
                /* set uidvalidity */
                uid_validity = dbox_get_uidvalidity_next(box->list);
        }