mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-28 05:49:35 +00:00
Move back used helper functions to the public API.
- Add docstring - Move the declaration in kiwix namespace. - Adapt our include to include the right headers.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
#include "../include/manager.h"
|
||||
#include "../include/server.h"
|
||||
#include "../include/name_mapper.h"
|
||||
#include "../src/tools/pathTools.h"
|
||||
#include "../include/tools.h"
|
||||
|
||||
using TestContextImpl = std::vector<std::pair<std::string, std::string> >;
|
||||
struct TestContext : TestContextImpl {
|
||||
@ -81,8 +81,8 @@ private: // data
|
||||
ZimFileServer::ZimFileServer(int serverPort, std::string libraryFilePath)
|
||||
: manager(&this->library)
|
||||
{
|
||||
if ( isRelativePath(libraryFilePath) )
|
||||
libraryFilePath = computeAbsolutePath(getCurrentDirectory(), libraryFilePath);
|
||||
if ( kiwix::isRelativePath(libraryFilePath) )
|
||||
libraryFilePath = kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), libraryFilePath);
|
||||
manager.readFile(libraryFilePath, true, true);
|
||||
|
||||
run(serverPort);
|
||||
|
Reference in New Issue
Block a user