summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/filesystem/ops.cc
diff options
context:
space:
mode:
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-04 12:52:49 +0000
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-04 12:52:49 +0000
commitc61d5dc85c4ce6ad005a7fb8bb0bd5e775a3afa5 (patch)
tree38bed5547602f37fd3a38f274d966a8ef1d304dc /libstdc++-v3/src/filesystem/ops.cc
parent02c6b93259034f20c44111bd7eb818d64b967ae2 (diff)
PR libstdc++/71313
* src/filesystem/ops.cc (remove_all(const path&, error_code&)): Call remove_all for children of a directory. * testsuite/experimental/filesystem/operations/create_directories.cc: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/filesystem/ops.cc')
-rw-r--r--libstdc++-v3/src/filesystem/ops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc
index 67ed8e6e564c..9fb5b639fc0b 100644
--- a/libstdc++-v3/src/filesystem/ops.cc
+++ b/libstdc++-v3/src/filesystem/ops.cc
@@ -1194,7 +1194,7 @@ fs::remove_all(const path& p, error_code& ec) noexcept
uintmax_t count = 0;
if (ec.value() == 0 && fs.type() == file_type::directory)
for (directory_iterator d(p, ec), end; ec.value() == 0 && d != end; ++d)
- count += fs::remove(d->path(), ec);
+ count += fs::remove_all(d->path(), ec);
if (ec.value())
return -1;
return fs::remove(p, ec) ? ++count : -1; // fs:remove() calls ec.clear()