mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Update Manager to use Archive instead of Reader
kiwix::Manager uses Reader to import a zim file, it should be using zim::Archive directly.
This commit is contained in:
committed by
Matthieu Gautier
parent
8b12434ff2
commit
a3ba7619df
@ -215,8 +215,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);
|
||||
|
Reference in New Issue
Block a user