Handle directory entries that contain a forward slash in the filename in FAT filesystem.

This commit is contained in:
2021-06-02 19:25:41 +01:00
parent a2b4cc2c92
commit 2522db44dc
2 changed files with 6 additions and 0 deletions

View File

@@ -292,6 +292,9 @@ namespace Aaru.Filesystems
completeEntry.HumanName = filename;
}
// Atari ST allows slash AND colon so cannot simply substitute one for the other like in Mac filesystems
filename = filename.Replace('/', '\u2215');
// 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

View File

@@ -666,6 +666,9 @@ namespace Aaru.Filesystems
continue;
}
// Atari ST allows slash AND colon so cannot simply substitute one for the other like in Mac filesystems
filename = filename.Replace('/', '\u2215');
completeEntry.Shortname = filename;
if(_namespace == Namespace.Human)