mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add support for Human68k 18.3 filenames in FAT.
This commit is contained in:
@@ -211,6 +211,26 @@ namespace DiscImageChef.Filesystems.FAT
|
||||
if(extension != "") filename = name + "." + extension;
|
||||
else filename = name;
|
||||
|
||||
if(@namespace == Namespace.Human)
|
||||
{
|
||||
HumanDirectoryEntry humanEntry =
|
||||
Marshal.ByteArrayToStructureLittleEndian<HumanDirectoryEntry>(directoryBuffer, pos,
|
||||
Marshal
|
||||
.SizeOf<HumanDirectoryEntry
|
||||
>());
|
||||
|
||||
completeEntry.HumanDirent = humanEntry;
|
||||
|
||||
name = StringHandlers.CToString(humanEntry.name1, Encoding).TrimEnd();
|
||||
extension = StringHandlers.CToString(humanEntry.extension, Encoding).TrimEnd();
|
||||
string name2 = StringHandlers.CToString(humanEntry.name2, Encoding).TrimEnd();
|
||||
|
||||
if(extension != "") filename = name + name2 + "." + extension;
|
||||
else filename = name + name2;
|
||||
|
||||
completeEntry.HumanName = filename;
|
||||
}
|
||||
|
||||
// Using array accessor ensures that repeated entries just get substituted.
|
||||
// Repeated entries are not allowed but some bad implementations (e.g. FAT32.IFS)allow to create them
|
||||
// when using spaces
|
||||
|
||||
Reference in New Issue
Block a user