mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Don't ignore Apple_Free partitions, just ignore partitions
that extend past the device size.
This commit is contained in:
@@ -267,9 +267,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
// BeOS doesn't mark its partitions as valid
|
// BeOS doesn't mark its partitions as valid
|
||||||
//if(flags.HasFlag(AppleMapFlags.Valid) &&
|
//if(flags.HasFlag(AppleMapFlags.Valid) &&
|
||||||
if(StringHandlers.CToString(entry.type) != "Apple_partition_map" && entry.sectors > 0 &&
|
if(StringHandlers.CToString(entry.type) != "Apple_partition_map" && entry.sectors > 0)
|
||||||
// Some CD and DVDs end with an Apple_Free that expands beyond the disc size...
|
|
||||||
StringHandlers.CToString(entry.type) != "Apple_Free")
|
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
@@ -311,8 +309,16 @@ namespace DiscImageChef.PartPlugins
|
|||||||
}
|
}
|
||||||
|
|
||||||
_partition.Description = sb.ToString();
|
_partition.Description = sb.ToString();
|
||||||
partitions.Add(_partition);
|
// Some CD and DVDs end with an Apple_Free that expands beyond the disc size...
|
||||||
sequence++;
|
if(_partition.End < imagePlugin.ImageInfo.sectors)
|
||||||
|
{
|
||||||
|
partitions.Add(_partition);
|
||||||
|
sequence++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DicConsole.DebugWriteLine("AppleMap Plugin", "Not adding partition because end ({0}) is outside media size ({1})", _partition.End, imagePlugin.ImageInfo.sectors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user