Skip to content

fix: consider readonly files when deleting directories - #863

Merged
mergify[bot] merged 5 commits into
TestableIO:mainfrom
VictorLlanir:issue/849
Jul 15, 2022
Merged

fix: consider readonly files when deleting directories#863
mergify[bot] merged 5 commits into
TestableIO:mainfrom
VictorLlanir:issue/849

Conversation

@VictorLlanir

@VictorLlanirVictorLlanir commented Jul 3, 2022

Copy link
Copy Markdown

Closes#849 by implementing directory validation for ReadOnly files when trying to delete directory recursively

On the RemoveFile method, there was no validation to check if there is a ReadOnly file inside the directory berfore trying to remove. This PR implements this validation.

@VictorLlanirVictorLlanir changed the title #849 - Implementing directory validation for ReadOnly filesfix: #849 - Implementing directory validation for ReadOnly filesJul 3, 2022
@fgreinacher
fgreinacher self-requested a review July 11, 2022 20:59

@fgreinacherfgreinacher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot @VictorLlanir, I have a small question/suggestion, let me know what you think.

Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileSystem.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileSystem.cs Outdated
@VictorLlanir

Copy link
Copy Markdown
Author

You're right, @fgreinacher. I'm going to fix this and update this PR.

@fgreinacherfgreinacher changed the title fix: #849 - Implementing directory validation for ReadOnly filesfix: consider readonly files when deleting directoriesJul 15, 2022

@fgreinacherfgreinacher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looking great now!

@github-actions

Copy link
Copy Markdown

This is addressed in release v17.0.23.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: releasedIssues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursively delete a directory with readonly file results in inconsistent state

2 participants

@VictorLlanir@fgreinacher