Use generic method to search for partitions, supporting

partitions inside partitions. At the same time SGI DVH is
	disabled because it is not working correctly. Fixes #60
This commit is contained in:
2017-07-24 23:35:33 +01:00
parent dad9ea8584
commit 72dd8d9179
108 changed files with 517 additions and 521 deletions

View File

@@ -120,32 +120,13 @@ namespace DiscImageChef.Commands
return;
}
List<CommonTypes.Partition> partitions = new List<CommonTypes.Partition>();
string partition_scheme = "";
List<Partition> partitions = Partitions.GetAll(_imageFormat);
Partitions.AddSchemesToStats(partitions);
// TODO: Solve possibility of multiple partition schemes (CUE + MBR, MBR + RDB, CUE + APM, etc)
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
{
List<CommonTypes.Partition> _partitions;
if(_partplugin.GetInformation(_imageFormat, out _partitions))
{
partition_scheme = _partplugin.Name;
partitions.AddRange(_partitions);
Core.Statistics.AddPartition(_partplugin.Name);
}
}
if(_imageFormat.ImageHasPartitions())
{
partition_scheme = _imageFormat.GetImageFormat();
partitions.AddRange(_imageFormat.GetPartitions());
}
if(partition_scheme == "")
if(partitions.Count == 0)
DicConsole.DebugWriteLine("Extract-Files command", "No partitions found");
else
{
DicConsole.WriteLine("Partition scheme identified as {0}", partition_scheme);
DicConsole.WriteLine("{0} partitions found.", partitions.Count);
for(int i = 0; i < partitions.Count; i++)