Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #132 #135

Merged
merged 2 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ jobs:
cc: clang
cxx: clang++

- name: "Ubuntu 16.04 Clang 6.0"
os: ubuntu-16.04
- name: "Ubuntu 18.04 Clang 6.0"
os: ubuntu-18.04
build_type: Release
packages: ninja-build clang-6.0
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: clang-6.0
cxx: clang++-6.0

- name: "Ubuntu 16.04 Clang 5.0"
os: ubuntu-16.04
- name: "Ubuntu 18.04 Clang 5.0"
os: ubuntu-18.04
build_type: Release
packages: ninja-build clang-5.0
generator: Ninja
Expand Down
2 changes: 1 addition & 1 deletion include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4740,7 +4740,7 @@ GHC_INLINE uintmax_t remove_all(const path& p, std::error_code& ec) noexcept
return static_cast<uintmax_t>(-1);
}
std::error_code tec;
auto fs = status(p, tec);
auto fs = symlink_status(p, tec);
if (exists(fs) && is_directory(fs)) {
for (auto iter = directory_iterator(p, ec); iter != directory_iterator(); iter.increment(ec)) {
if (ec && !detail::is_not_found_error(ec)) {
Expand Down
4 changes: 4 additions & 0 deletions test/filesystem_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2607,6 +2607,10 @@ TEST_CASE("fs.op.remove_all - remove_all", "[filesystem][operations][fs.op.remov
CHECK_NOTHROW(fs::remove_all("dir1/non-existing", ec));
CHECK(!ec);
CHECK(fs::remove_all("dir1/non-existing", ec) == 0);
if (is_symlink_creation_supported()) {
fs::create_directory_symlink("dir1", "dir1link");
CHECK(fs::remove_all("dir1link") == 1);
}
CHECK(fs::remove_all("dir1") == 5);
CHECK(fs::directory_iterator(t.path()) == fs::directory_iterator());
}
Expand Down