Merge pull request #555 from kiwix/manager_add_no_library

It is ok to not be able to read library if we ADD book to non existant library
pull/558/head
Kelson 4 years ago committed by GitHub
commit 2c40d23991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -263,8 +263,10 @@ int main(int argc, char** argv)
: libraryPath;
kiwix::Manager manager(&library);
if (!manager.readFile(libraryPath, false)) {
std::cerr << "Cannot read the library " << libraryPath << std::endl;
return 1;
if (kiwix::fileExists(libraryPath) || action!=ADD) {
std::cerr << "Cannot read the library " << libraryPath << std::endl;
return 1;
}
}
/* SHOW */

Loading…
Cancel
Save