From faee566824fe3567c8beacf097f9dcfc0d3761b7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 16 Nov 2016 13:29:49 +0200 Subject: [PATCH] lib-index: Fix flushing NFS if minimum wanted transaction log file is lost --- src/lib-index/mail-transaction-log-view.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib-index/mail-transaction-log-view.c b/src/lib-index/mail-transaction-log-view.c index b64ace3cd7..296098f66d 100644 --- a/src/lib-index/mail-transaction-log-view.c +++ b/src/lib-index/mail-transaction-log-view.c @@ -156,9 +156,11 @@ int mail_transaction_log_view_set(struct mail_transaction_log_view *view, for (seq = min_file_seq; seq <= max_file_seq; seq++) { if (file == NULL || file->hdr.file_seq != seq) { /* see if we could find the missing file. if we know - the max. file sequence, make sure NFS attribute - cache gets flushed if necessary. */ - bool nfs_flush = max_file_seq != (uint32_t)-1; + the max. file sequence or we don't have the the min. + file, make sure NFS attribute cache gets flushed if + necessary. */ + bool nfs_flush = seq == min_file_seq || + max_file_seq != (uint32_t)-1; ret = mail_transaction_log_find_file(view->log, seq, nfs_flush, &file); -- 2.47.3