# HG changeset patch # User Timo Sirainen # Date 1197210035 -7200 # Node ID 66b439e24c47a28456c17cd06e96ba64b32bc067 # Parent d373913cd7639cfa555783ee9e96124385869e45 If we're rotating log file while we're locked, lock the newly created file so the lock is preserved. diff -r d373913cd763 -r 66b439e24c47 src/lib-index/mail-transaction-log-file.c --- a/src/lib-index/mail-transaction-log-file.c Sun Dec 09 16:08:25 2007 +0200 +++ b/src/lib-index/mail-transaction-log-file.c Sun Dec 09 16:20:35 2007 +0200 @@ -519,6 +519,12 @@ file->fd = new_fd; ret = mail_transaction_log_file_stat(file, FALSE); + if (file->log->head != NULL && file->log->head->locked) { + /* we'll need to preserve the lock */ + if (mail_transaction_log_file_lock(file) < 0) + ret = -1; + } + /* if we return -1 the dotlock deletion code closes the fd */ file->fd = -1; if (ret < 0)