+ fix library update with readonly libraries

This commit is contained in:
kelson42 2013-08-06 12:41:14 +08:00
parent 34d69ae2c2
commit c80914b774
1 changed files with 3 additions and 1 deletions

View File

@ -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;