Skip to content

Commit

Permalink
Update Manager to use Archive instead of Reader
Browse files Browse the repository at this point in the history
kiwix::Manager uses Reader to import a zim file, it should be using
zim::Archive directly.
  • Loading branch information
maneeshpm committed Jul 3, 2021
1 parent 678b31f commit ce920e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ bool Manager::readBookFromPath(const std::string& path, kiwix::Book* book)
tmp_path = computeAbsolutePath(getCurrentDirectory(), path);
}
try {
kiwix::Reader reader(tmp_path);
book->update(reader);
zim::Archive archive(tmp_path);
book->update(archive);
book->setPathValid(true);
} catch (const std::exception& e) {
book->setPathValid(false);
Expand Down

0 comments on commit ce920e8

Please sign in to comment.