b***@public.gmane.org
2011-03-26 14:11:50 UTC
http://bugs.openzim.org/show_bug.cgi?id=33
Summary: file::findxByTitle() fails
Product: openZIM
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: zimlib
AssignedTo: tommi-+ciCUjOJn3Ednm+***@public.gmane.org
ReportedBy: emmanuel-***@public.gmane.org
CC: dev-l-***@public.gmane.org
Estimated Hours: 0.0
It seems that zimlib file::findxByTitle() always returns an good result
iterator which is deincremented of one (so always wrong).
code:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===
code with workaround:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===
Summary: file::findxByTitle() fails
Product: openZIM
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: zimlib
AssignedTo: tommi-+ciCUjOJn3Ednm+***@public.gmane.org
ReportedBy: emmanuel-***@public.gmane.org
CC: dev-l-***@public.gmane.org
Estimated Hours: 0.0
It seems that zimlib file::findxByTitle() always returns an good result
iterator which is deincremented of one (so always wrong).
code:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===
code with workaround:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===
--
Configure bugmail: http://bugs.openzim.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Configure bugmail: http://bugs.openzim.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.