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: move a read-only file #1239

Merged
merged 2 commits into from
Mar 1, 2025
Merged

fix: move a read-only file #1239

merged 2 commits into from
Mar 1, 2025

Conversation

vbreuss
Copy link
Member

@vbreuss vbreuss commented Mar 1, 2025

Fixes the bug reported in #1207 (which was introduced in #870) that it is not possible to move a read-only file: The AddFile and RemoveFile now have an optional parameter verifyAccess which if set to false will omit the access check, thus not throwing the UnauthorizedAccessException.

Fixes the bug reported in #1207 (which was introduced in #870) that it is not possible to move a read-only file:
The `AddFile` and `RemoveFile` now have an optional parameter `verifyAccess` which if set to `false` will omit the access check, thus not throwing the `UnauthorizedAccessException`.
@vbreuss vbreuss added the type: bug Issues that describe misbehaving functionality label Mar 1, 2025
@vbreuss vbreuss self-assigned this Mar 1, 2025
@vbreuss vbreuss enabled auto-merge (squash) March 1, 2025 18:22
Copy link

github-actions bot commented Mar 1, 2025

Test Results

    31 files  ±0     31 suites  ±0   14s ⏱️ -1s
 1 133 tests ±0  1 132 ✅ ±0    1 💤 ±0  0 ❌ ±0 
10 767 runs  ±0  9 982 ✅ ±0  785 💤 ±0  0 ❌ ±0 

Results for commit 99616be. ± Comparison against base commit 111b3ab.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
System.IO.Abstractions.TestingHelpers.Tests.MockFileMoveTests ‑ MockFile_Move_WithReadOnlyAttribute_ShouldThrowUnauthorizedAccessExceptionAndNotMoveFile
System.IO.Abstractions.TestingHelpers.Tests.MockFileMoveTests ‑ MockFile_Move_WithReadOnlyAttribute_ShouldMoveFile

@vbreuss vbreuss disabled auto-merge March 1, 2025 18:25
@vbreuss vbreuss enabled auto-merge (squash) March 1, 2025 18:25
@vbreuss vbreuss merged commit b6e34e5 into main Mar 1, 2025
10 checks passed
@vbreuss vbreuss deleted the topic/fix-1207-move-readonly-file branch March 1, 2025 18:30
@vbreuss vbreuss linked an issue Mar 1, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Mar 1, 2025

This is addressed in release v22.0.11.

@github-actions github-actions bot added the state: released Issues that are released label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: released Issues that are released type: bug Issues that describe misbehaving functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot Move a readonly file
1 participant