extmod/vfs_fat.c still uses _FS_REENTRANT, but lib/oofatfs now uses FF_FS_REENTRANT
Port, board and/or hardware
anything using vfs_fat.c
MicroPython version
v1.23 and more recent
Reproduction
extmod/vfs_fat.c still has a couple of #if _FS_REENTRANT, but all the code in lib/oofatfs/ switched to FF_FS_REENTRANT years ago. So I think this was an edit that should have been made but was not.
We noticed this when merging MicroPython into CircuitPython during the last couple of merges.
Expected behaviour
Observed behaviour
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
fat filesystem can rename a directory inside of itself
Over in Circuitpython, we noticed that (via the web workflow, though it's equally possible in the repl) it was possible to rename a directory "inside of itself", making the filesystem corrupt.
I created a failing test for this, specifically against the fat filesystem implementation: https://github.com/micropython/micropython/compare/master...jepler:circuitpython:vfs-fat-island?expand=1#files_bucket
I don't know whether other filesystems like littlefs are affected, I didn't test it.