From: Timo Sirainen Date: Sun, 19 May 2013 22:39:52 +0000 (+0300) Subject: maildir: Reverted most of changeset c92ebbedc6f9. X-Git-Tag: 2.2.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=001ec60f2fdec082ee5804b541cfbc37f377aa88;p=thirdparty%2Fdovecot%2Fcore.git maildir: Reverted most of changeset c92ebbedc6f9. If dovecot-uidlist file is recreated, it gets a new inode number, and we should recognize by that alone that it has changed. More importantly this forced re-reading of dovecot-uidlist clears out the RACING flag, making it impossible to handle reappearing maildir files. --- diff --git a/src/lib-storage/index/maildir/maildir-uidlist.c b/src/lib-storage/index/maildir/maildir-uidlist.c index 84d83dddd3..897904f82d 100644 --- a/src/lib-storage/index/maildir/maildir-uidlist.c +++ b/src/lib-storage/index/maildir/maildir-uidlist.c @@ -100,7 +100,6 @@ struct maildir_uidlist { unsigned int unsorted:1; unsigned int have_mailbox_guid:1; unsigned int opened_readonly:1; - unsigned int reread:1; }; struct maildir_uidlist_sync_ctx { @@ -878,11 +877,6 @@ maildir_uidlist_has_changed(struct maildir_uidlist *uidlist, bool *recreated_r) *recreated_r = TRUE; return 1; } - if (uidlist->reread) { - uidlist->reread = FALSE; - *recreated_r = TRUE; - return 1; - } if (st.st_ino != uidlist->fd_ino || !CMP_DEV_T(st.st_dev, uidlist->fd_dev)) { @@ -2075,9 +2069,6 @@ void maildir_uidlist_add_flags(struct maildir_uidlist *uidlist, rec = hash_table_lookup(uidlist->files, filename); i_assert(rec != NULL); - if ((flags & MAILDIR_UIDLIST_REC_FLAG_RACING) != 0) - uidlist->reread = TRUE; - rec->flags |= flags; }