mirror of
https://github.com/QuasarApp/macdependency.git
synced 2025-05-06 08:39: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;
|
tryAgainWithoutSuffix = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// complete path (with working directory)
|
// make path absolute (with working directory) if it is not absolute yet
|
||||||
usedName = workingPath + "/" + usedName;
|
if (usedName.compare(0, 1, "/") != 0) {
|
||||||
|
usedName = workingPath + "/" + usedName;
|
||||||
|
}
|
||||||
|
|
||||||
struct stat buffer;
|
struct stat buffer;
|
||||||
if (stat(usedName.c_str(), &buffer) == 0) {
|
if (stat(usedName.c_str(), &buffer) == 0) {
|
||||||
return usedName;
|
return usedName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user