mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-24 04:20:56 -04:00
Merge pull request #468 from kiwix/new_tools_libkiwix
Adapt kiwix-tools to the new libkiwix headers.
This commit is contained in:
commit
c3721970c5
@ -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);
|
||||
|
@ -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 (...) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user