-
- Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
This is on Python 3.10, master
branch.
It seems that MemoryFS.move
does not update the name of entries being moved, only updating the name in the parent entry (the directory). If an entry is being renamed, this will cause issues for walkers and scandir
, but not for listdir
.
Steps to reproduce:
import fs with fs.open_fs("mem://") as mem: mem.makedir("foo").writetext("test.txt", "Hello, World") mem.move("foo/test.txt", "foo/test2.txt") print(mem.listdir("/foo")) mem.tree()
Expected output:
['test2.txt'] └── foo └── test2.txt
Actual output:
['test2.txt'] └── foo └── test.txt