3
0
Fork 0

Merge pull request #289 from kiwix/fix_multiple_add

Correctly set the zimPathToSave if there are several zim file to add.
fix-bug-pid
Kelson 7 years ago committed by GitHub
commit 5931ac45c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -173,8 +173,8 @@ bool handle_add(kiwix::Library* library, const std::string& libraryPath,
for(auto i=optind; i<argc; i++) {
std::string zimPath = argv[i];
if (!zimPath.empty()) {
zimPathToSave = zimPathToSave == "." ? zimPath : zimPathToSave;
manager.addBookFromPathAndGetId(zimPath, zimPathToSave, url, false);
auto _zimPathToSave = zimPathToSave == "." ? zimPath : zimPathToSave;
manager.addBookFromPathAndGetId(zimPath, _zimPathToSave, url, false);
} else {
std::cerr << "Invalid zim file path" << std::endl;
resultCode = 1;

Loading…
Cancel
Save