mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-24 21:06:42 -04:00
parent
d1edbc11d3
commit
81ac333cc9
@ -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