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 file move time preservation (#558) #559

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mj0nez
Copy link

@mj0nez mj0nez commented Dec 29, 2022

Type of changes

  • Bug fix

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I've updated the Documentation.
  • I accept that @PyFilesystem/maintainers may be pedantic in the code review.

Description

This PR fixes a bug in the methods FS.move and MemoryFS.move, where preserve_time=True resulted in an ResourceNotFound error (see #558).

The new functions to separate copy.copy_modified_time are currently residing in copy.py. One could argue that reading and updating a files meta info are more suitable for info.py, but this would introduce further changes. Additionally, we could modify the original one to utilize both new functions. This would avoid code duplication but introduce further function calls. Opinions on this matter and reviews are welcomed!

Lastly, I would update the documentation for the new functions accordingly.

@mj0nez mj0nez marked this pull request as ready for review December 31, 2022 14:45
@mj0nez
Copy link
Author

mj0nez commented Jan 7, 2023

@lurch, any thoughts on this draft? :)

@mj0nez
Copy link
Author

mj0nez commented May 7, 2023

Ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant