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.
Fix the following issues:
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.