mirror of https://github.com/kiwix/libkiwix.git
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:
parent
8b12434ff2
commit
a3ba7619df
|
@ -215,8 +215,8 @@ bool Manager::readBookFromPath(const std::string& path, kiwix::Book* book)
|
||||||
tmp_path = computeAbsolutePath(getCurrentDirectory(), path);
|
tmp_path = computeAbsolutePath(getCurrentDirectory(), path);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
kiwix::Reader reader(tmp_path);
|
zim::Archive archive(tmp_path);
|
||||||
book->update(reader);
|
book->update(archive);
|
||||||
book->setPathValid(true);
|
book->setPathValid(true);
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
book->setPathValid(false);
|
book->setPathValid(false);
|
||||||
|
|
Loading…
Reference in New Issue