From c80914b7745cf381e121e13f88c4ed6e75b1a3f7 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Tue, 6 Aug 2013 12:41:14 +0800 Subject: [PATCH] + fix library update with readonly libraries --- src/common/kiwix/library.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;