Skip to content

Fix move and movedir methods of MemoryFS not renaming the entry #510

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

Merged
merged 5 commits into from
Dec 13, 2021

Conversation

althonos
Copy link
Member

@althonos althonos commented Dec 13, 2021

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 accept that @PyFilesystem/maintainers may be pedantic in the code review.

Description

Fix MemoryFS.move and MemoryFS.movedir not renaming the entry that gets moved, which is causing issues with scandir (#509). This was not being picked by current tests, so I updated the test_move_file_same_fs and test_move_dir_same_fs test cases to detect the issue before fixing it.

@althonos althonos changed the title Fix memoryfs move Fix memoryfs move not re Dec 13, 2021
@althonos althonos changed the title Fix memoryfs move not re Fix move and movedir methods of MemoryFS not renaming the entry Dec 13, 2021
@althonos althonos added bug and removed bug labels Dec 13, 2021
@althonos althonos merged commit f3338d9 into master Dec 13, 2021
@althonos althonos deleted the fix-memoryfs-move branch December 13, 2021 17:26
@coveralls
Copy link

coveralls commented Dec 13, 2021

Coverage Status

Coverage increased (+0.002%) to 95.245% when pulling d76e7f3 on fix-memoryfs-move into 7f19638 on master.

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.

Moving a file in MemoryFS doesn't update its name and causes issues with walk
2 participants