mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
Update kiwix-search.cpp for a bug fix
This commit is contained in:
parent
b2aeb08051
commit
6f2316bc8a
@ -104,7 +104,14 @@ int main(int argc, char** argv)
|
||||
|
||||
if (reader) {
|
||||
searcher = new kiwix::Searcher();
|
||||
searcher->add_reader(reader);
|
||||
bool contians_FTIndex=searcher->add_reader(reader);
|
||||
if(!contians_FTIndex){
|
||||
std::cerr << "The Zim file does not contain a full-text index." << std::endl;
|
||||
if(suggestionFlag){
|
||||
exit(0);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
cerr << "Unable to search through zim '" << zimPath << "'." << endl;
|
||||
exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user