http://bugs.openzim.org/show_bug.cgi?id=13
Summary: zim::File::find always returns an article Product: openZIM Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: zimlib AssignedTo: tommi@tntnet.org ReportedBy: emmanuel@engelhart.org CC: dev-l@openzim.org Estimated Hours: 0.0
If I call find() with a title corresponding to nothing ("ahsdfkijhasfnsadf" for example) in the ZIM file, find() returns an other article.
To my opinion, I should have a way to indentify if the article was found or not (currently i compare the title I have given and article.getTitle() but this can not be the good way)
My code looks like following: zim::File::const_iterator iterator = zimFileHandler->find(ns[0], zim::QUnicodeString(title)); zim::Article article = zimFileHandler->getArticle(iterator.getIndex());