mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Path: Prevent Path::RealPath from returning '.' and '..' components
This commit is contained in:
@@ -453,6 +453,11 @@ std::string Path::RealPath(const std::string_view path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If any relative symlinks were resolved, there may be '.' and '..'
|
||||
// components in the resultant path, which must be removed.
|
||||
realpath = Path::Canonicalize(realpath);
|
||||
|
||||
#endif
|
||||
|
||||
return realpath;
|
||||
|
||||
Reference in New Issue
Block a user