ghc::filesystem Release v1.5.16

2026-07-19 12:56

Today I released v1.5.16 of ghc::filesystem , my implementation of C++17 std::filesystem for C++11, C++14, C++17 and C++20.

After a much too long break, this release collects all the fixes that accumulated in the meantime: better UNC path handling on Windows, directory iteration and proximate() in builds without exception support, EINTR retry handling on POSIX, subsecond modification times, and a modernized CI configuration. Sorry for the very long delay!

The full list of changes in v1.5.16:

  • Fix for #203 , directory iteration and proximate() are available in builds without exception support, with iteration errors terminating the process.
  • Fix for #191 , appending to a host-only UNC path now inserts the missing separator.
  • Fix for #170 , lexically_normal() now preserves IPv6 components in device UNC paths.
  • Fix for #171 , canonical() now supports device UNC paths.
  • Fix for #204 , weakly_canonical() now propagates component lookup errors.
  • Fix for #205 , copy_file() now reports an error for non-regular sources.
  • Fix for #206 , Windows error formatting now handles unknown error codes safely.
  • Fix for #207 , last_write_time() now consistently follows symlinks.
  • Fix for #208 , filesystem metadata now preserves subsecond modification times.
  • Fix for #209 , malformed UTF-16 no longer drops subsequent valid code units.
  • Fix for #210 , equivalent() now compares only filesystem identity.
  • Fix for #178 , recursive iteration no longer resolves symlinks unless requested.
  • Fix for #185 , lexically_normal() now preserves unresolved parent components in relative paths.
  • Pull requests #198 and #199 , updated CI for current runners and compiler toolchains, retaining legacy compiler and MSVC v142 coverage and adding MSYS2 GCC and Clang builds, fixing #189 .
  • Pull requests #177 and #197 , fixed EINTR retry handling in POSIX read(), opendir() and readdir() loops.
  • Avoided unnecessary temporary string creation during Windows directory iteration.
  • Pull request #190 , fixed preprocessor checks for builds using -Wundef.
  • Pull request #188 , replaced use of the GNU getcwd(NULL, 0) extension.
  • Pull request #179 , fixed lexically_relative() when the normalized base equals the target.
  • Pull request #176 , documented the external Bazel rules.
  • Pull request #174 , CMake no longer prints diagnostic messages when used as a subproject.
  • Pull request #172 , allowed wide-path file streams with recent libstdc++ versions on Windows.
  • Pull request #167 , improved dynamic selection and deployment target handling across Apple platforms, fixing #168 .
  • Fix for #166 , extension() did return non empty result for the directory name "..".

I want to thank all contributors for their support!