mirror of https://github.com/kiwix/libkiwix.git
+ fix in ro library mgmt
This commit is contained in:
parent
c80914b774
commit
435e7ac76f
|
@ -91,8 +91,8 @@ namespace kiwix {
|
||||||
/* Try to find it */
|
/* Try to find it */
|
||||||
std::vector<kiwix::Book>::iterator itr;
|
std::vector<kiwix::Book>::iterator itr;
|
||||||
for ( itr = this->books.begin(); itr != this->books.end(); ++itr ) {
|
for ( itr = this->books.begin(); itr != this->books.end(); ++itr ) {
|
||||||
if (itr->id == book.id && (itr->readOnly == book.readOnly || book.readOnly)) {
|
if (itr->id == book.id) {
|
||||||
|
if (itr->readOnly == book.readOnly || book.readOnly) {
|
||||||
itr->readOnly = book.readOnly;
|
itr->readOnly = book.readOnly;
|
||||||
|
|
||||||
if (itr->path.empty())
|
if (itr->path.empty())
|
||||||
|
@ -122,6 +122,7 @@ namespace kiwix {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* otherwise */
|
/* otherwise */
|
||||||
this->books.push_back(book);
|
this->books.push_back(book);
|
||||||
|
|
Loading…
Reference in New Issue