From e12880f96fa42ce889c08d51876cf782afe11aa4 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Mon, 4 Jul 2016 15:52:49 +0300 Subject: re PR libstdc++/71313 ([Filesystem TS] remove_all fails to remove directory contents recursively) 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. From-SVN: r237978 --- libstdc++-v3/src/filesystem/ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 67ed8e6..9fb5b639 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() -- cgit v1.1