aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-02-12 15:13:02 +0000
committerJonathan Wakely <jwakely@redhat.com>2021-02-12 15:29:50 +0000
commit1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312 (patch)
treeb40d39cea46833b198503816d235bb00268cbe0d /libstdc++-v3/python
parent4179ec107943bea360b8aa75e29e2c5ad9f13e9e (diff)
downloadgcc-1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312.zip
gcc-1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312.tar.gz
gcc-1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312.tar.bz2
libstdc++: Fix filesystem::rename on Windows [PR 98985]
The _wrename function won't overwrite an existing file, so use MoveFileEx instead. That allows renaming directories over files, which POSIX doesn't allow, so check for that case explicitly and report an error. Also document the deviation from the expected behaviour, and add a test for filesystem::rename which was previously missing. The Filesystem TS experimental::filesystem::rename doesn't have that extra code to handle directories correctly, so the relevant parts of the new test are not run on Windows. libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2014.xml: Document implementation specific properties of std::experimental::filesystem::rename. * doc/xml/manual/status_cxx2017.xml: Document implementation specific properties of std::filesystem::rename. * doc/html/*: Regenerate. * src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour for directories on Windows. * src/filesystem/ops-common.h (__gnu_posix::rename): Use MoveFileExW on Windows. * testsuite/27_io/filesystem/operations/rename.cc: New test. * testsuite/experimental/filesystem/operations/rename.cc: New test.
Diffstat (limited to 'libstdc++-v3/python')
0 files changed, 0 insertions, 0 deletions