From: Timo Sirainen Date: Tue, 29 Oct 2013 19:07:28 +0000 (+0200) Subject: lib-index: Don't mix index struct caching for in-memory vs. disk indexes. X-Git-Tag: 2.2.7~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=561049f25e47e45589e5da295112526b1431a9e0;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Don't mix index struct caching for in-memory vs. disk indexes. --- diff --git a/src/lib-index/mail-index-alloc-cache.c b/src/lib-index/mail-index-alloc-cache.c index 21685bc618..5a36e8a072 100644 --- a/src/lib-index/mail-index-alloc-cache.c +++ b/src/lib-index/mail-index-alloc-cache.c @@ -97,7 +97,8 @@ mail_index_alloc_cache_find(const char *mailbox_path, const char *index_dir, else match = rec; } - } else if (mailbox_path != NULL && rec->mailbox_path != NULL) { + } else if (mailbox_path != NULL && rec->mailbox_path != NULL && + index_dir == NULL && rec->index_dir_ino == 0) { if (strcmp(mailbox_path, rec->mailbox_path) == 0) match = rec; }