mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Use realpath() in make_canonical to properly resolve symlinks
This commit is contained in:
parent
3ad6400098
commit
09f6436745
@ -1064,6 +1064,14 @@ make_canonical() {
|
||||
// The root directory is a special case.
|
||||
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();
|
||||
if (!r_make_canonical(cwd)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user