diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 46940388b4..a73dab6700 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 '.' and '..' + // components in the resultant path, which must be removed. + realpath = Path::Canonicalize(realpath); + #endif return realpath;