Merge pull request #468 from kiwix/new_tools_libkiwix

Adapt kiwix-tools to the new libkiwix headers.
This commit is contained in:
Kelson 2021-07-08 13:10:45 +02:00 committed by GitHub
commit c3721970c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -18,8 +18,8 @@
*/
#include <getopt.h>
#include <kiwix/tools/stringTools.h>
#include <kiwix/manager.h>
#include <kiwix/tools.h>
#include <cstdlib>
#include <iostream>
@ -255,8 +255,8 @@ int main(int argc, char** argv)
}
/* Try to read the file */
libraryPath = isRelativePath(libraryPath)
? computeAbsolutePath(getCurrentDirectory(), libraryPath)
libraryPath = kiwix::isRelativePath(libraryPath)
? kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), libraryPath)
: libraryPath;
kiwix::Manager manager(&library);
manager.readFile(libraryPath, false);

View File

@ -21,7 +21,7 @@
#include <kiwix/manager.h>
#include <kiwix/server.h>
#include <kiwix/name_mapper.h>
#include <kiwix/tools/otherTools.h>
#include <kiwix/tools.h>
#ifdef _WIN32
# include <windows.h>
@ -196,8 +196,8 @@ int main(int argc, char** argv)
try {
string libraryPath
= isRelativePath(*itr)
? computeAbsolutePath(getCurrentDirectory(), *itr)
= kiwix::isRelativePath(*itr)
? kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), *itr)
: *itr;
retVal = manager.readFile(libraryPath, true, trustlibrary);
} catch (...) {