mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01: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