TL;DR: FATDirentry.IsLabel() treats every LFN entry as a volume label so listdir()/walk() silently drop all files with LFNs.
The regression was introduced in commit 3dccfee ("FAT IsLabel must set/check bit 3 ONLY").
IsLabel() tests self._buf[0x0B] & 0x08. For LFN entries _buf has the LFN slots before the 8.3 slot, so _buf[0x0B] is the first LFN slot's attribute byte (0x0F), which satisfies the condition -> listdir() / walk() skip these entries
Previously, the check was simply "== 0x08", (and well, 0x08 != 0x0F :P ) so this was masked.
IsDir() uses self._buf[-21] (the last slot), which should be the correct offset...
Example: on a Windows 98 Raw disk image, \WINDOWS\SYSTEM dropped around 100 files, all of which had LFN slots, the 8.3-only names are fine.
(I think the same 0x0B offset into _buf is wrong for mark=1 too, which would corrupt the first LFN slot instead of marking the 8.3 slot)
Awesome library btw, I use it a lot :D
TL;DR: FATDirentry.IsLabel() treats every LFN entry as a volume label so listdir()/walk() silently drop all files with LFNs.
The regression was introduced in commit 3dccfee ("FAT IsLabel must set/check bit 3 ONLY").
IsLabel() tests self._buf[0x0B] & 0x08. For LFN entries _buf has the LFN slots before the 8.3 slot, so _buf[0x0B] is the first LFN slot's attribute byte (0x0F), which satisfies the condition -> listdir() / walk() skip these entries
Previously, the check was simply "== 0x08", (and well, 0x08 != 0x0F :P ) so this was masked.
IsDir() uses self._buf[-21] (the last slot), which should be the correct offset...
Example: on a Windows 98 Raw disk image, \WINDOWS\SYSTEM dropped around 100 files, all of which had LFN slots, the 8.3-only names are fine.
(I think the same 0x0B offset into _buf is wrong for mark=1 too, which would corrupt the first LFN slot instead of marking the 8.3 slot)
Awesome library btw, I use it a lot :D