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: Delete directory recursive should delete files in subfolders #422

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

ElStefan
Copy link
Contributor

Calling MockFileSystem.Directory.Delete with recursive: true throws a DirectoryNotEmptyException when trying to delete a directory with files in it.

As the documentation of Directory.Delete(String, Boolean) indicates, the method should actually try to delete all files and subfolders instead.

Copy link
Member

@vbreuss vbreuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ElStefan for this fix! 👍

@vbreuss vbreuss enabled auto-merge (squash) November 16, 2023 09:19
@vbreuss vbreuss merged commit 7e7026e into Testably:main Nov 16, 2023
7 checks passed
Copy link

This is addressed in release v2.5.1.

mergify bot pushed a commit to Testably/Testably.Abstractions.FluentAssertions that referenced this pull request Nov 16, 2023
#65)

[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Testably.Abstractions.Testing](https://togithub.com/Testably/Testably.Abstractions)
| `2.5.0` -> `2.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions.Testing/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions.Testing/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions.Testing/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions.Testing/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Testably/Testably.Abstractions
(Testably.Abstractions.Testing)</summary>

###
[`v2.5.1`](https://togithub.com/Testably/Testably.Abstractions/releases/tag/v2.5.1)

#### What's Changed

- chore(deps): update testably.abstractions packages to v2.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#410
- fix: support relative path with drive information in
`Path.GetFullPath` by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#411
- chore(deps): update xunit-dotnet monorepo by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#412
- chore(deps): update dependency xunit to v2.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#413
- chore(deps): update actions/checkout digest to
[`b4ffde6`](https://togithub.com/Testably/Testably.Abstractions/commit/b4ffde6)
by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#414
- fix: `Directory.EnumerateDirectories` with trailing slash in `path` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#415
- chore(deps): update dependency xunit to v2.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#416
- chore(deps): update dependency xunit to v2.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#417
- chore(deps): update dependency microsoft.net.test.sdk to v17.8.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#418
- feat: enable support for .NET 8.0 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#389
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.0 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#420
- feat: update references to net8 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#421
- fix: Delete directory recursive should delete files in subfolders by
[@&#8203;ElStefan](https://togithub.com/ElStefan) in
[Testably/Testably.Abstractions#422

**Full Changelog**:
Testably/Testably.Abstractions@v2.5.0...v2.5.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Testably/Testably.Abstractions.FluentAssertions).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mergify bot pushed a commit to Testably/Testably.Abstractions.FluentAssertions that referenced this pull request Nov 16, 2023
…5.1 (#64)

[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Testably.Abstractions.Interface](https://togithub.com/Testably/Testably.Abstractions)
| `2.5.0` -> `2.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions.Interface/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions.Interface/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions.Interface/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions.Interface/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Testably/Testably.Abstractions
(Testably.Abstractions.Interface)</summary>

###
[`v2.5.1`](https://togithub.com/Testably/Testably.Abstractions/releases/tag/v2.5.1)

#### What's Changed

- chore(deps): update testably.abstractions packages to v2.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#410
- fix: support relative path with drive information in
`Path.GetFullPath` by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#411
- chore(deps): update xunit-dotnet monorepo by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#412
- chore(deps): update dependency xunit to v2.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#413
- chore(deps): update actions/checkout digest to
[`b4ffde6`](https://togithub.com/Testably/Testably.Abstractions/commit/b4ffde6)
by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#414
- fix: `Directory.EnumerateDirectories` with trailing slash in `path` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#415
- chore(deps): update dependency xunit to v2.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#416
- chore(deps): update dependency xunit to v2.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#417
- chore(deps): update dependency microsoft.net.test.sdk to v17.8.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#418
- feat: enable support for .NET 8.0 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#389
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.0 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#420
- feat: update references to net8 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#421
- fix: Delete directory recursive should delete files in subfolders by
[@&#8203;ElStefan](https://togithub.com/ElStefan) in
[Testably/Testably.Abstractions#422

**Full Changelog**:
Testably/Testably.Abstractions@v2.5.0...v2.5.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Testably/Testably.Abstractions.FluentAssertions).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mergify bot pushed a commit that referenced this pull request Nov 16, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Testably.Abstractions](https://togithub.com/Testably/Testably.Abstractions)
| `2.5.0` -> `2.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[Testably.Abstractions.Testing](https://togithub.com/Testably/Testably.Abstractions)
| `2.5.0` -> `2.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions.Testing/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions.Testing/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions.Testing/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions.Testing/2.5.0/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Testably/Testably.Abstractions
(Testably.Abstractions)</summary>

###
[`v2.5.1`](https://togithub.com/Testably/Testably.Abstractions/releases/tag/v2.5.1)

##### What's Changed

- chore(deps): update testably.abstractions packages to v2.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[#410
- fix: support relative path with drive information in
`Path.GetFullPath` by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[#411
- chore(deps): update xunit-dotnet monorepo by
[@&#8203;renovate](https://togithub.com/renovate) in
[#412
- chore(deps): update dependency xunit to v2.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[#413
- chore(deps): update actions/checkout digest to
[`b4ffde6`](https://togithub.com/Testably/Testably.Abstractions/commit/b4ffde6)
by [@&#8203;renovate](https://togithub.com/renovate) in
[#414
- fix: `Directory.EnumerateDirectories` with trailing slash in `path` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[#415
- chore(deps): update dependency xunit to v2.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[#416
- chore(deps): update dependency xunit to v2.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[#417
- chore(deps): update dependency microsoft.net.test.sdk to v17.8.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[#418
- feat: enable support for .NET 8.0 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[#389
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.0 by [@&#8203;renovate](https://togithub.com/renovate) in
[#420
- feat: update references to net8 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[#421
- fix: Delete directory recursive should delete files in subfolders by
[@&#8203;ElStefan](https://togithub.com/ElStefan) in
[#422

**Full Changelog**:
v2.5.0...v2.5.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Testably/Testably.Abstractions).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants