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
|
||||
//if(flags.HasFlag(AppleMapFlags.Valid) &&
|
||||
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")
|
||||
if(StringHandlers.CToString(entry.type) != "Apple_partition_map" && entry.sectors > 0)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -311,9 +309,17 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
_partition.Description = sb.ToString();
|
||||
// Some CD and DVDs end with an Apple_Free that expands beyond the disc size...
|
||||
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