Fix a small bug in the indexing code to avoid forgetting around 100 articler per ZIM file

This commit is contained in:
kelson42
2011-01-29 20:59:30 +00:00
parent fa0add82ac
commit e19e53e373

View File

@ -66,7 +66,7 @@ namespace kiwix {
this->indexNextPercentPre(); this->indexNextPercentPre();
while(this->currentArticleOffset < thresholdOffset && while(this->currentArticleOffset < thresholdOffset &&
this->currentArticleOffset < this->lastArticleOffset) { this->currentArticleOffset <= this->lastArticleOffset) {
zim::Article currentArticle; zim::Article currentArticle;
@ -76,7 +76,7 @@ namespace kiwix {
} while (this->currentArticleOffset++ && } while (this->currentArticleOffset++ &&
currentArticle.isRedirect() && currentArticle.isRedirect() &&
this->currentArticleOffset != this->lastArticleOffset); this->currentArticleOffset != this->lastArticleOffset);
if (!currentArticle.isRedirect()) { if (!currentArticle.isRedirect()) {
/* Index the content */ /* Index the content */
@ -114,8 +114,7 @@ namespace kiwix {
this->indexNextPercentPost(); this->indexNextPercentPost();
/* increment the offset and set returned value */ /* increment the offset and set returned value */
if (this->currentArticleOffset < this->lastArticleOffset) { if (this->currentArticleOffset <= this->lastArticleOffset) {
this->currentArticleOffset++;
return true; return true;
} else { } else {
this->stopIndexing(); this->stopIndexing();