PR libstdc++/83626 Don't throw for remove("") and remove_all("")
commit7fd2dd851da3401a5c7352cad8c57ef0c0adac59
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Jan 2018 22:58:59 +0000 (4 22:58 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Jan 2018 22:58:59 +0000 (4 22:58 +0000)
treed56ca6c24dcfc46fd9e90c16f3a7bd1f63eb0ea2
parent4f7adb1689cf076f2277e80a7c5f5353bde97d7e
PR libstdc++/83626 Don't throw for remove("") and remove_all("")

PR libstdc++/83626
* src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
redundant call to ec.clear().
(remove_all(const path&, error_code&))): Do not return an error for
non-existent paths.
* src/filesystem/std-ops.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: New test.
* testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
results for non-existent paths.
* testsuite/experimental/filesystem/operations/remove.cc: New test.
* testsuite/experimental/filesystem/operations/remove_all.cc: Fix
expected results for non-existent paths.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256269 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/ops.cc
libstdc++-v3/src/filesystem/std-ops.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc [copied from libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc with 60% similarity]
libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc [copied from libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc with 59% similarity]
libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc