diff --git a/src/common/kiwix/library.cpp b/src/common/kiwix/library.cpp index 9ccc91471..309bc72fa 100644 --- a/src/common/kiwix/library.cpp +++ b/src/common/kiwix/library.cpp @@ -91,7 +91,9 @@ namespace kiwix { /* Try to find it */ std::vector::iterator 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()) itr->path = book.path;