Relative paths are relative to current directory not executable.

Almost nothing should be relative to the executable directory.
Content coming from the user should be relative to where the user
is (its working directory).

Fixes #70.
This commit is contained in:
Matthieu Gautier 2017-11-13 11:52:40 +01:00
parent 1fcc1ad9d4
commit fa9b027a39

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 (...) {