only make path absolute if it is not yet absolute

This commit is contained in:
Konrad Windszus 2016-11-27 18:46:32 +01:00
parent 861bc718e7
commit 66202abd66

View File

@ -315,8 +315,10 @@ std::string DynamicLoader::getExistingPathname(const std::string& name, const st
tryAgainWithoutSuffix = true;
}
// complete path (with working directory)
// make path absolute (with working directory) if it is not absolute yet
if (usedName.compare(0, 1, "/") != 0) {
usedName = workingPath + "/" + usedName;
}
struct stat buffer;
if (stat(usedName.c_str(), &buffer) == 0) {