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: correctly handle access when moving a file #873

Merged

Conversation

vbreuss
Copy link
Member

@vbreuss vbreuss commented Aug 9, 2022

Fixes #870:
Change the order when moving files:

  1. Remove the previous file (throws an exception, if the file access is not sufficient)
  2. Add the moved file on the new location

Also added a unit test to verify the behavior.

@vbreuss vbreuss force-pushed the bugfix/870-move-file-with-readonly-attribute branch from c757dbb to 3de0256 Compare August 10, 2022 17:57
Fix function call order also in second `Move` method
@vbreuss vbreuss force-pushed the bugfix/870-move-file-with-readonly-attribute branch from 3de0256 to a008c15 Compare August 11, 2022 06:01
@fgreinacher fgreinacher changed the title fix: #870 Moving a readonly file duplicates the file fix: correctly handle access when moving a file Aug 15, 2022
@fgreinacher
Copy link
Contributor

Thanks a ton @vbreuss!

@mergify mergify bot merged commit df30ba4 into TestableIO:main Aug 15, 2022
@github-actions
Copy link

This is addressed in release v17.0.28.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move a readonly file results in inconsistent state
3 participants