-
-
Notifications
You must be signed in to change notification settings - Fork 9
fix: correctly handle readonly directories during delete #854
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes handling of readonly directories during delete operations to properly match Windows behavior. The fix ensures that attempting to delete a readonly directory on Windows throws an IOException with the correct error message and path information.
Key changes:
- Add test coverage for readonly directory deletion behavior
- Fix the exception thrown when accessing readonly directories to include the full path
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
Tests/Testably.Abstractions.Tests/FileSystem/DirectoryInfo/DeleteTests.cs | Adds test case for deleting readonly directories with Windows-specific behavior validation |
Tests/Testably.Abstractions.Tests/FileSystem/Directory/DeleteTests.cs | Adds test case for deleting readonly directories via Directory.Delete method |
Source/Testably.Abstractions.Testing/Storage/InMemoryStorage.cs | Updates delete operation to properly handle metadata errors for readonly directories |
Source/Testably.Abstractions.Testing/Storage/InMemoryContainer.cs | Fixes exception to include the full path when access is denied to readonly directories |
Source/Testably.Abstractions.Testing/Storage/InMemoryContainer.cs
Outdated
Show resolved
Hide resolved
Test Results 37 files ± 0 37 suites ±0 20m 40s ⏱️ -18s For more details on these failures, see this check. Results for commit 4da05d4. ± Comparison against base commit f764c5c. |
|
This is addressed in release v4.3.5. |
This PR fixes handling of readonly directories during delete operations to properly match Windows behavior. The fix ensures that attempting to delete a readonly directory on Windows throws an IOException with the correct error message and path information.
Key changes: