]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mailbox log: Don't log an error if two processes rotate the log at the same time.
authorTimo Sirainen <tss@iki.fi>
Sat, 20 Feb 2010 07:47:41 +0000 (09:47 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 20 Feb 2010 07:47:41 +0000 (09:47 +0200)
--HG--
branch : HEAD

src/lib-index/mailbox-log.c

index e08376e3add81077705fc7fe73eabaac75f77929..7b1b4fda7564cf0d98e9fe126b1d3f3e846dde09 100644 (file)
@@ -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;