From 6951f17a2e75034e40dab23be97e927e00e924dd Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 20 Oct 2003 06:25:10 +0300 Subject: [PATCH] mbox was always synced when mailbox was opened. --HG-- branch : HEAD --- src/lib-index/mbox/mbox-sync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib-index/mbox/mbox-sync.c b/src/lib-index/mbox/mbox-sync.c index b166bb9975..ea5ebdb83c 100644 --- a/src/lib-index/mbox/mbox-sync.c +++ b/src/lib-index/mbox/mbox-sync.c @@ -74,8 +74,9 @@ int mbox_index_sync(struct mail_index *index, int minimal_sync __attr_unused__, } filesize = st.st_size; - if (index->mbox_ino != st.st_ino || - !CMP_DEV_T(index->mbox_dev, st.st_dev)) { + if (index->mbox_fd != -1 && + (index->mbox_ino != st.st_ino || + !CMP_DEV_T(index->mbox_dev, st.st_dev))) { /* mbox file was overwritten, close it if it was open */ index->mbox_dev = st.st_dev; index->mbox_ino = st.st_ino; -- 2.47.3