If the last directory entry in a directory is removed via PyFatFS.remove(), then this entry is not properly overwritten in the filesystem, leaving a broken directory entry in place:
import fs
with fs.open_fs("/dev/sda1") as my_fs:
my_fs.removetree("/EFI")
Suspected cause is that with an empty byte_repr data size the erase function does not properly work and cannot align to the next biggest byte size of the directory cluster and thus does not erase the actual directory entry.
If the last directory entry in a directory is removed via
PyFatFS.remove()
, then this entry is not properly overwritten in the filesystem, leaving a broken directory entry in place:Suspected cause is that with an empty byte_repr data size the erase function does not properly work and cannot align to the next biggest byte size of the directory cluster and thus does not erase the actual directory entry.