Decode and list EAs in FAT12 and FAT16.

This commit is contained in:
2019-04-27 20:19:18 +01:00
parent 3d8f0f2380
commit 27d1f83d61
5 changed files with 124 additions and 7 deletions

View File

@@ -605,13 +605,15 @@ namespace DiscImageChef.Filesystems.FAT
// Check it is really an OS/2 EA file
if(eaDirEntry.start_cluster != 0)
{
ulong secadd = firstClusterSector + eaDirEntry.start_cluster * sectorsPerCluster;
byte[] eadata =
imagePlugin.ReadSectors(firstClusterSector + eaDirEntry.start_cluster * sectorsPerCluster,
sectorsPerCluster);
ushort eamagic = BitConverter.ToUInt16(eadata, 0);
CacheEaData();
ushort eamagic = BitConverter.ToUInt16(cachedEaData, 0);
if(eamagic != EADATA_MAGIC) eaDirEntry = new DirectoryEntry();
if(eamagic != EADATA_MAGIC)
{
eaDirEntry = new DirectoryEntry();
cachedEaData = null;
}
else eaCache = new Dictionary<string, Dictionary<string, byte[]>>();
}
mounted = true;