commit
e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.
When FAT directory entry has leading byte 0x05 it is interpreted as byte
0xE5. This is how FAT stores file name which starts with byte 0xE5 as
leading byte in 0xE5 in FAT directory entry means that file slot is empty.
Fixes: #533
if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
FAT_ATTR_VOLUME_ID) {
DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
+ if (ent->name[0] == 0x05)
+ ent->name[0] = 0xE5;
return ent->name;
}
}