diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp index 96947f67b..8d5fc02a1 100644 --- a/src/common/file_system.cpp +++ b/src/common/file_system.cpp @@ -465,6 +465,10 @@ std::string Path::RealPath(const std::string_view& path) } #endif + // Get rid of any current/parent directory components before returning. + // This should be fine on Linux, since any symbolic links have already replaced the leading portion. + Path::Canonicalize(&realpath); + return realpath; }