Discussion:
[Bug 33] New: file::findxByTitle() fails
b***@public.gmane.org
2011-03-26 14:11:50 UTC
Permalink
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);
}
===
--
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.
b***@public.gmane.org
2011-03-27 18:52:13 UTC
Permalink
http://bugs.openzim.org/show_bug.cgi?id=33


Emmanuel Engelhart <emmanuel-***@public.gmane.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID




--- Comment #1 from Emmanuel Engelhart <emmanuel-***@public.gmane.org> 2011-03-27 20:52:13 CET ---
It works, this bug is invalid
--
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.
Loading...