It is ok to not be able to read library if we ADD book to non existant lib

pull/555/head
Matthieu Gautier 4 years ago
parent 78887d6815
commit ca8d6e570c

@ -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