]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
maildir: If we see duplicate file with retry_rewind set, try rewinding first.
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Sep 2010 14:41:25 +0000 (15:41 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Sep 2010 14:41:25 +0000 (15:41 +0100)
src/lib-storage/index/maildir/maildir-uidlist.c

index d5fc2531161e9986c037baf2022663d9cf63530c..0ecfbc497413459771a7e9875d7c20e474058e41 100644 (file)
@@ -534,9 +534,12 @@ static bool maildir_uidlist_next(struct maildir_uidlist *uidlist,
                /* This can happen if expunged file is moved back and the file
                   was appended to uidlist. */
                i_warning("%s: Duplicate file entry at line %u: "
-                         "%s (uid %u -> %u)",
+                         "%s (uid %u -> %u)%s",
                          uidlist->path, uidlist->read_line_count, line,
-                         old_rec->uid, uid);
+                         old_rec->uid, uid, uidlist->retry_rewind ?
+                         " - retrying by re-reading from beginning" : "");
+               if (uidlist->retry_rewind)
+                       return FALSE;
                /* Delete the old UID */
                maildir_uidlist_records_array_delete(uidlist, old_rec);
                /* Replace the old record with this new one */