From 5c2280e7c7fb1ff44e3e21833ff938eb1c9dc00a Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Sun, 13 Aug 2017 11:20:31 -0400 Subject: [PATCH] Claims that multi part zim has no embedded full text index. We cannot search into an embedded fulltext index if the zim is multipart. Instead of crashing, let's pretend we have no fulltext index. --- src/reader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reader.cpp b/src/reader.cpp index a21fdf77b..f73611ec1 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -589,7 +589,8 @@ bool Reader::urlExists(const string& url) const /* Does the ZIM file has a fulltext index */ bool Reader::hasFulltextIndex() const { - return this->urlExists("/Z/fulltextIndex/xapian"); + return ( this->urlExists("/Z/fulltextIndex/xapian") + && !zimFileHandler->is_multiPart() ); } /* Search titles by prefix */