-
-
Notifications
You must be signed in to change notification settings - Fork 177
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 backward incompatibility introduced in 2.4.16 (#535) #542
Conversation
I found another case where the optimized and the regular code path behave differently: with open_fs(fs_url) as tmp:
tmp.writetext("file.txt", "content")
fs.move.move_file(tmp, "file.txt", tmp, "file.txt") If you move a file onto itself, the optimized code path works as expected, but the regular code path happens to delete the file. This is not wanted, I guess? I added some code to fix this. EDIT: |
Eeek! If attempting to move a file onto itself, I guess it makes sense to just early-exit? 🤔 |
What stops this PR from being resolved? |
I still think you ought to do |
Yep, some things left to do on my side. Didn't have the time yet. |
@tfeldmann Can you create an issue for https://github.com/PyFilesystem/pyfilesystem2/blob/master/fs/base.py#L1138 please? |
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.
👍
On it! |
HOORAY! Good job everybody let's bump a version for this library already! |
Great job @tfeldmann ! |
Type of changes
Checklist
Description
Added
overwrite=True
to the optimized path infs.move.move_file
.move_file
now behaves like in versions <2.4.16.