mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Final cleanup of DiscImageChef.Filesystems.
This commit is contained in:
@@ -91,8 +91,8 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
entry.flMdDat = BigEndianBitConverter.ToUInt32(directoryBlocks, offset + 46);
|
||||
entry.flNam = new byte[directoryBlocks[offset + 50] + 1];
|
||||
Array.Copy(directoryBlocks, offset + 50, entry.flNam, 0, entry.flNam.Length);
|
||||
string lowerFilename = StringHandlers.PascalToString(entry.flNam, CurrentEncoding).ToLowerInvariant()
|
||||
.Replace('/', ':');
|
||||
string lowerFilename = StringHandlers
|
||||
.PascalToString(entry.flNam, CurrentEncoding).ToLowerInvariant().Replace('/', ':');
|
||||
|
||||
if(entry.flFlags.HasFlag(MFS_FileFlags.Used) && !idToFilename.ContainsKey(entry.flFlNum) &&
|
||||
!idToEntry.ContainsKey(entry.flFlNum) && !filenameToId.ContainsKey(lowerFilename) &&
|
||||
|
||||
@@ -169,8 +169,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
|
||||
if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0)
|
||||
{
|
||||
stat.Blocks = directoryBlocks.Length / stat.BlockSize +
|
||||
directoryBlocks.Length % stat.BlockSize;
|
||||
stat.Blocks = directoryBlocks.Length / stat.BlockSize + directoryBlocks.Length % stat.BlockSize;
|
||||
stat.Length = directoryBlocks.Length;
|
||||
}
|
||||
else if(string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0)
|
||||
|
||||
@@ -56,8 +56,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
return drSigWord == MFS_MAGIC;
|
||||
}
|
||||
|
||||
public override void GetInformation(ImagePlugin imagePlugin, Partition partition,
|
||||
out string information)
|
||||
public override void GetInformation(ImagePlugin imagePlugin, Partition partition, out string information)
|
||||
{
|
||||
information = "";
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
#pragma warning disable 169
|
||||
|
||||
namespace DiscImageChef.Filesystems.AppleMFS
|
||||
@@ -42,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
public partial class AppleMFS
|
||||
{
|
||||
/// <summary>
|
||||
/// Master Directory Block, should be at offset 0x0400 bytes in volume
|
||||
/// Master Directory Block, should be at offset 0x0400 bytes in volume
|
||||
/// </summary>
|
||||
struct MFS_MasterDirectoryBlock
|
||||
{
|
||||
@@ -79,7 +80,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should be at offset 0x0000 in volume, followed by boot code
|
||||
/// Should be at offset 0x0000 in volume, followed by boot code
|
||||
/// </summary>
|
||||
struct MFS_BootBlock
|
||||
{
|
||||
|
||||
@@ -74,8 +74,8 @@ namespace DiscImageChef.Filesystems.AppleMFS
|
||||
|
||||
if(!ArrayHelpers.ArrayIsNullOrEmpty(entry.flUsrWds)) xattrs.Add("com.apple.FinderInfo");
|
||||
|
||||
if(debug && device.ImageInfo.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag) &&
|
||||
entry.flLgLen > 0) xattrs.Add("com.apple.macintosh.tags");
|
||||
if(debug && device.ImageInfo.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag) && entry.flLgLen > 0)
|
||||
xattrs.Add("com.apple.macintosh.tags");
|
||||
|
||||
xattrs.Sort();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user