mirror of
https://github.com/QuasarApp/macdependency.git
synced 2025-05-03 23:29:33 +00:00
only make path absolute if it is not yet absolute
This commit is contained in:
parent
861bc718e7
commit
66202abd66
@ -315,9 +315,11 @@ std::string DynamicLoader::getExistingPathname(const std::string& name, const st
|
||||
tryAgainWithoutSuffix = true;
|
||||
}
|
||||
|
||||
// complete path (with working directory)
|
||||
usedName = workingPath + "/" + usedName;
|
||||
|
||||
// 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) {
|
||||
return usedName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user