# HG changeset patch # User Timo Sirainen # Date 1184502478 -10800 # Node ID 8da2881df0dcac991c12e7929ee9543882072992 # Parent f40d16eed722d32f92cf59a840cccd0df655065d mail_index_move_to_memory(): Don't log an error if index fd is already closed diff -r f40d16eed722 -r 8da2881df0dc src/lib-index/mail-index.c --- a/src/lib-index/mail-index.c Sun Jul 15 14:44:23 2007 +0300 +++ b/src/lib-index/mail-index.c Sun Jul 15 15:27:58 2007 +0300 @@ -665,10 +665,11 @@ if (index->file_lock != NULL) file_lock_free(&index->file_lock); - /* close the index file. */ - if (close(index->fd) < 0) - mail_index_set_syscall_error(index, "close()"); - index->fd = -1; + if (index->fd != -1) { + if (close(index->fd) < 0) + mail_index_set_syscall_error(index, "close()"); + index->fd = -1; + } return 0; }