mirror of https://github.com/kiwix/libkiwix.git
+ fix library update with readonly libraries
This commit is contained in:
parent
34d69ae2c2
commit
c80914b774
|
@ -91,7 +91,9 @@ 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) {
|
if (itr->id == book.id && (itr->readOnly == book.readOnly || book.readOnly)) {
|
||||||
|
|
||||||
|
itr->readOnly = book.readOnly;
|
||||||
|
|
||||||
if (itr->path.empty())
|
if (itr->path.empty())
|
||||||
itr->path = book.path;
|
itr->path = book.path;
|
||||||
|
|
Loading…
Reference in New Issue