Skip to content

fix: move a read-only file - #1239

Merged
vbreuss merged 2 commits into
mainfrom
topic/fix-1207-move-readonly-file
Mar 1, 2025
Merged

fix: move a read-only file#1239
vbreuss merged 2 commits into
mainfrom
topic/fix-1207-move-readonly-file

Conversation

@vbreuss

Copy link
Copy Markdown
Member

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`.
@vbreussvbreuss added the type: bug Issues that describe misbehaving functionality label Mar 1, 2025
@vbreussvbreuss self-assigned this Mar 1, 2025
@vbreuss
vbreuss enabled auto-merge (squash) March 1, 2025 18:22
@github-actions

Copy link
Copy Markdown

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
Copy Markdown

@vbreuss
vbreuss merged commit b6e34e5 into mainMar 1, 2025
@vbreuss
vbreuss deleted the topic/fix-1207-move-readonly-file branch March 1, 2025 18:30
@vbreussvbreuss linked an issue Mar 1, 2025 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

This is addressed in release v22.0.11.

@github-actionsgithub-actionsBot added the state: released Issues that are released label Mar 1, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: releasedIssues that are releasedtype: bugIssues that describe misbehaving functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot Move a readonly file

1 participant

@vbreuss