diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 9be8f7e6a7737..0ce135a187dd0 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -453,6 +453,11 @@ std::string Path::RealPath(const std::string_view path) } } } + + // If any relative symlinks were resolved, there may be '..' components in + // the resultant path, which must be removed. + realpath = Path::Canonicalize(realpath); + #endif return realpath;