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: memfs Rename() issue #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanderwang
Copy link

Fix the following issues:

  • After renaming, it adds an entry for each regular files in the s.children map, which should actually only contain directories
  • Even worse, any child files in a directory that are renamed before the directory itself will be lost when the directory is renamed.

Since the createParent method is called at the end of the move method, the directory structure is automatically updated when the files are renamed. Assigning the old value of s.children to the new value does nothing to help except create the issues described above.

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