mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Do not try to read EAs from FAT16 directory entry field when it is a FAT32 volume. Fixes #361
This commit is contained in:
1
.idea/.idea.Aaru/.idea/contentModel.xml
generated
1
.idea/.idea.Aaru/.idea/contentModel.xml
generated
@@ -1375,7 +1375,6 @@
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.0" t="Include">
|
||||
<e p="Aaru.Gui.AssemblyInfo.cs" t="Include" />
|
||||
<e p="Avalonia" t="Include">
|
||||
<e p="resources" t="Include" />
|
||||
</e>
|
||||
|
||||
@@ -273,8 +273,9 @@ namespace Aaru.Filesystems.FAT
|
||||
}
|
||||
|
||||
// Check OS/2 .LONGNAME
|
||||
if(eaCache != null &&
|
||||
(@namespace == Namespace.Os2 || @namespace == Namespace.Ecs))
|
||||
if(eaCache != null &&
|
||||
(@namespace == Namespace.Os2 || @namespace == Namespace.Ecs) &&
|
||||
!fat32)
|
||||
{
|
||||
List<KeyValuePair<string, CompleteDirectoryEntry>> filesWithEas =
|
||||
currentDirectory.Where(t => t.Value.Dirent.ea_handle != 0).ToList();
|
||||
|
||||
@@ -117,9 +117,8 @@ namespace Aaru.Filesystems.FAT
|
||||
|
||||
statfs = new FileSystemInfo
|
||||
{
|
||||
Blocks = XmlFsType.Clusters, FilenameLength = 11,
|
||||
Files = 0, // Requires traversing all directories
|
||||
FreeFiles = 0, PluginId = Id, FreeBlocks = 0 // Requires traversing the FAT
|
||||
Blocks = XmlFsType.Clusters, FilenameLength = 11, Files = 0, // Requires traversing all directories
|
||||
FreeFiles = 0, PluginId = Id, FreeBlocks = 0 // Requires traversing the FAT
|
||||
};
|
||||
|
||||
// This is needed because for FAT16, GEMDOS increases bytes per sector count instead of using big_sectors field.
|
||||
@@ -774,8 +773,9 @@ namespace Aaru.Filesystems.FAT
|
||||
eaCache = new Dictionary<string, Dictionary<string, byte[]>>();
|
||||
|
||||
// Check OS/2 .LONGNAME
|
||||
if(eaCache != null &&
|
||||
(this.@namespace == Namespace.Os2 || this.@namespace == Namespace.Ecs))
|
||||
if(eaCache != null &&
|
||||
(this.@namespace == Namespace.Os2 || this.@namespace == Namespace.Ecs) &&
|
||||
!fat32)
|
||||
{
|
||||
List<KeyValuePair<string, CompleteDirectoryEntry>> rootFilesWithEas =
|
||||
rootDirectoryCache.Where(t => t.Value.Dirent.ea_handle != 0).ToList();
|
||||
|
||||
Reference in New Issue
Block a user