dovecot-2.2: maildir: Don't try to preserve old filename when sa...

dovecot at dovecot.org dovecot at dovecot.org
Sun Feb 17 10:11:35 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/e07a8b17af8b
changeset: 15818:e07a8b17af8b
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Feb 17 10:11:20 2013 +0200
description:
maildir: Don't try to preserve old filename when saving if uidlist couldn't be locked.

diffstat:

 src/lib-storage/index/maildir/maildir-save.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r c92ebbedc6f9 -r e07a8b17af8b src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c	Sun Feb 17 10:10:45 2013 +0200
+++ b/src/lib-storage/index/maildir/maildir-save.c	Sun Feb 17 10:11:20 2013 +0200
@@ -818,12 +818,13 @@
 {
 	uoff_t size;
 
-	if (!ctx->locked_uidlist_refresh) {
+	if (!ctx->locked_uidlist_refresh && ctx->locked) {
 		(void)maildir_uidlist_refresh(ctx->mbox->uidlist);
 		ctx->locked_uidlist_refresh = TRUE;
 	}
 
-	if ((prev_mf != NULL && maildir_filename_has_conflict(mf, prev_mf)) ||
+	if (!ctx->locked_uidlist_refresh ||
+	    (prev_mf != NULL && maildir_filename_has_conflict(mf, prev_mf)) ||
 	    maildir_uidlist_get_full_filename(ctx->mbox->uidlist,
 					      mf->dest_basename) != NULL) {
 		/* file already exists. give it another name.


More information about the dovecot-cvs mailing list