(flags & MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE) == 0)
i_fatal("nfs flush requires mmap_disable=yes");
- index->open_count++;
if ((ret = mail_index_open_files(index, flags)) <= 0) {
/* doesn't exist and create flag not used */
+ index->open_count++;
mail_index_close(index);
return ret;
}
+ index->open_count++;
i_assert(index->map != NULL);
mail_index_alloc_cache_index_opened(index);
file exists. */
return 0;
}
+ if (log->index->open_count == 0) {
+ /* we're opening the index and we just opened the
+ log file. don't waste time checking if there's a
+ newer one. */
+ return 0;
+ }
if (mail_transaction_log_refresh(log, FALSE) < 0)
return -1;