https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98985
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I'll fix it by using MoveFileExW in posix::rename instead. MoveFileExW seems to have some weird differences from POSIX rename when the source or destination name is a directory.