https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101510
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:124eaa50e0a34f5f89572c1aa812c50979da58fc commit r12-2421-g124eaa50e0a34f5f89572c1aa812c50979da58fc Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Jul 20 18:15:48 2021 +0100 libstdc++: Fix create_directories to resolve symlinks [PR101510] When filesystem__create_directories checks to see if the path already exists and resovles to a directory, it uses filesystem::symlink_status, which means it reports an error if the path is a symlink. It should use filesystem::status, so that the target directory is detected, and no error is reported. Signed-off-by: Jonathan Wakely <jwak...@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/101510 * src/c++17/fs_ops.cc (fs::create_directories): Use status instead of symlink_status. * src/filesystem/ops.cc (fs::create_directories): Likewise. * testsuite/27_io/filesystem/operations/create_directories.cc: * testsuite/27_io/filesystem/operations/create_directory.cc: Do not test with symlinks on Windows. * testsuite/experimental/filesystem/operations/create_directories.cc: * testsuite/experimental/filesystem/operations/create_directory.cc: Do not test with symlinks on Windows.