mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Refactor AppleDOS and solves bug preventing VTOC from being retrieved as "$Vtoc".
This commit is contained in:
@@ -47,9 +47,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// <param name="dest">Link destination.</param>
|
||||
public override Errno ReadLink(string path, ref string dest)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
return Errno.NotSupported;
|
||||
return !mounted ? Errno.AccessDenied : Errno.NotSupported;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -97,10 +95,9 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
if(debug) catalogMs.Write(catSectorB, 0, catSectorB.Length);
|
||||
|
||||
// Read the catalog sector
|
||||
CatalogSector catSector;
|
||||
IntPtr catPtr = Marshal.AllocHGlobal(256);
|
||||
Marshal.Copy(catSectorB, 0, catPtr, 256);
|
||||
catSector = (CatalogSector)Marshal.PtrToStructure(catPtr, typeof(CatalogSector));
|
||||
CatalogSector catSector = (CatalogSector)Marshal.PtrToStructure(catPtr, typeof(CatalogSector));
|
||||
Marshal.FreeHGlobal(catPtr);
|
||||
|
||||
foreach(FileEntry entry in catSector.entries.Where(entry => entry.extentTrack > 0)) {
|
||||
|
||||
Reference in New Issue
Block a user