aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-11-29 00:39:37 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-11-29 00:39:37 +0000
commitffe2c05539d5ec6bfc4154fcdc71c41adf900a29 (patch)
treeca81cca12fb5d845c034143ff054836d87df5c23 /gcc
parent2182a27d856af0fb660db77a7751dc5a2ba0df59 (diff)
downloadgcc-ffe2c05539d5ec6bfc4154fcdc71c41adf900a29.zip
gcc-ffe2c05539d5ec6bfc4154fcdc71c41adf900a29.tar.gz
gcc-ffe2c05539d5ec6bfc4154fcdc71c41adf900a29.tar.bz2
PR libstdc++/86910 fix filesystem::create_directories
Implement the proposed semantics from P1164R0, which reverts the changes of LWG 2935. This means that failure to create a directory because a non-directory already exists with that name will be reported as an error. While rewriting the function, also fix PR 87846, which is a result of the C++17 changes to how a trailing slash on a path affects the last component of a path. PR libstdc++/86910 PR libstdc++/87846 * src/filesystem/ops.cc (experimental::create_directories): Report an error when the path resolves to an existing non-directory (P1164). * src/filesystem/std-ops.cc (create_directories): Likewise. Handle empty filenames due to trailing slashes. * testsuite/27_io/filesystem/operations/create_directories.cc: Test when some component of the path exists and is not a directory. Test trailing slashes. * testsuite/experimental/filesystem/operations/create_directories.cc: Likewise. From-SVN: r266598
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions