From: Timo Sirainen Date: Sat, 20 Feb 2010 07:47:41 +0000 (+0200) Subject: mailbox log: Don't log an error if two processes rotate the log at the same time. X-Git-Tag: 2.0.beta3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e9713e7b02b2b47c339476725f9fbfd9bf78cff;p=thirdparty%2Fdovecot%2Fcore.git mailbox log: Don't log an error if two processes rotate the log at the same time. --HG-- branch : HEAD --- diff --git a/src/lib-index/mailbox-log.c b/src/lib-index/mailbox-log.c index e08376e3ad..7b1b4fda75 100644 --- a/src/lib-index/mailbox-log.c +++ b/src/lib-index/mailbox-log.c @@ -121,7 +121,7 @@ static int mailbox_log_rotate_if_needed(struct mailbox_log *log) 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;