mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 03:12:20 -04:00
Avoid recopy of books
This commit is contained in:
parent
eb407956b9
commit
640f907fb2
@ -1085,7 +1085,7 @@ int main(int argc, char** argv)
|
||||
globalSearcher->setProtocolPrefix(rootLocation + "/");
|
||||
globalSearcher->setSearchProtocolPrefix(rootLocation + "/" + "search?");
|
||||
for (auto& bookId: booksIds) {
|
||||
auto currentBook = library.getBookById(bookId);
|
||||
auto& currentBook = library.getBookById(bookId);
|
||||
auto zimPath = currentBook.getPath();
|
||||
auto indexPath = currentBook.getIndexPath();
|
||||
|
||||
@ -1129,7 +1129,7 @@ int main(int argc, char** argv)
|
||||
= ""
|
||||
"<div class='book__list'>";
|
||||
for (auto& bookId: booksIds) {
|
||||
auto currentBook = library.getBookById(bookId);
|
||||
auto& currentBook = library.getBookById(bookId);
|
||||
|
||||
if (!currentBook.getPath().empty()
|
||||
&& readers.find(currentBook.getHumanReadableIdFromPath())
|
||||
|
Loading…
x
Reference in New Issue
Block a user