Merge pull request #104 from kiwix/library_relative_path

Relative paths are relative to current directory not executable.
This commit is contained in:
Matthieu Gautier 2017-11-13 15:14:42 +01:00 committed by GitHub
commit 05c734fc31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -920,9 +920,7 @@ int main(int argc, char** argv)
try {
string libraryPath
= isRelativePath(*itr)
? computeAbsolutePath(removeLastPathElement(
getExecutablePath(), true, false),
*itr)
? computeAbsolutePath(getCurrentDirectory(), *itr)
: *itr;
retVal = libraryManager.readFile(libraryPath, true);
} catch (...) {