dovecot-2.0: mailbox log: Don't log an error if two processes ro...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 20 11:45:56 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/cdced48a276a
changeset: 10782:cdced48a276a
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 20 09:47:41 2010 +0200
description:
mailbox log: Don't log an error if two processes rotate the log at the same time.

diffstat:

 src/lib-index/mailbox-log.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 0b139aae6276 -r cdced48a276a src/lib-index/mailbox-log.c
--- a/src/lib-index/mailbox-log.c	Sat Feb 20 09:46:43 2010 +0200
+++ b/src/lib-index/mailbox-log.c	Sat Feb 20 09:47:41 2010 +0200
@@ -121,7 +121,7 @@
 	if (st.st_size < MAILBOX_LOG_ROTATE_SIZE)
 		return 0;
 
-	if (rename(log->filepath, log->filepath2) < 0) {
+	if (rename(log->filepath, log->filepath2) < 0 && errno != ENOENT) {
 		i_error("rename(%s, %s) failed: %m",
 			log->filepath, log->filepath2);
 		return -1;


More information about the dovecot-cvs mailing list