mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-19 04:12:09 +00:00
This moves the common part of v3 and v4 canonical() to a separate function and changes the Windows implementation to use GetFinalPathNameByHandleW system call. As a side effect, this converts drive names to upper case, which makes paths more interoperable. Additionally, on POSIX systems, avoid adding a trailing directory separator if the input path has one (which may be the case in v4). This is consistent with libstdc++ and MSVC implementations of std::filesystem. Fixes https://github.com/boostorg/filesystem/issues/325.