mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Use realpath() in make_canonical to properly resolve symlinks
This commit is contained in:
parent
3ad6400098
commit
09f6436745
@ -1065,6 +1065,14 @@ make_canonical() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
// Use realpath in order to resolve symlinks properly
|
||||||
|
char newpath [PATH_MAX + 1];
|
||||||
|
if (realpath(c_str(), newpath) != NULL) {
|
||||||
|
(*this) = newpath;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Filename cwd = ExecutionEnvironment::get_cwd();
|
Filename cwd = ExecutionEnvironment::get_cwd();
|
||||||
if (!r_make_canonical(cwd)) {
|
if (!r_make_canonical(cwd)) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user