Skip to content

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
@github-actions
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
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2025

@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
@github-actions
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

2 participants