From 32b016f9b809f7062ab65dc290ee7738c887ca3c Mon Sep 17 00:00:00 2001 From: Marco Bettini Date: Wed, 6 Sep 2023 15:31:58 +0000 Subject: [PATCH] fts: fts_index_get_header() - Open the mailbox to access the index if not opened yet --- src/plugins/fts/fts-api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/fts/fts-api.c b/src/plugins/fts/fts-api.c index 1f8ea09663..6a8a393052 100644 --- a/src/plugins/fts/fts-api.c +++ b/src/plugins/fts/fts-api.c @@ -549,6 +549,11 @@ bool fts_index_get_header(struct mailbox *box, struct fts_index_header *hdr_r) size_t data_size; bool ret; + if (box->index == NULL && mailbox_open(box) < 0) { + i_zero(hdr_r); + return FALSE; + } + mail_index_refresh(box->index); view = mail_index_view_open(box->index); mail_index_get_header_ext(view, fts_index_get_ext_id(box), -- 2.47.3