mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🐛Correct setting resume before closing image.
This commit is contained in:
@@ -482,6 +482,13 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DumpHardwareType currentTry = null;
|
||||||
|
ExtentsULong extents = null;
|
||||||
|
ResumeSupport.Process(true, true, blocks, dev.Manufacturer, dev.Model, dev.Serial, dev.PlatformId,
|
||||||
|
ref resume, ref currentTry, ref extents);
|
||||||
|
if(currentTry == null || extents == null)
|
||||||
|
throw new InvalidOperationException("Could not process resume file, not continuing...");
|
||||||
|
|
||||||
// Try to read the Lead-in
|
// Try to read the Lead-in
|
||||||
if(dumpLeadIn)
|
if(dumpLeadIn)
|
||||||
{
|
{
|
||||||
@@ -574,13 +581,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
DicConsole.WriteLine("SCSI device type: {0}.", dev.ScsiType);
|
DicConsole.WriteLine("SCSI device type: {0}.", dev.ScsiType);
|
||||||
DicConsole.WriteLine("Media identified as {0}.", dskType);
|
DicConsole.WriteLine("Media identified as {0}.", dskType);
|
||||||
|
|
||||||
DumpHardwareType currentTry = null;
|
|
||||||
ExtentsULong extents = null;
|
|
||||||
ResumeSupport.Process(true, true, blocks, dev.Manufacturer, dev.Model, dev.Serial, dev.PlatformId,
|
|
||||||
ref resume, ref currentTry, ref extents);
|
|
||||||
if(currentTry == null || extents == null)
|
|
||||||
throw new InvalidOperationException("Could not process resume file, not continuing...");
|
|
||||||
|
|
||||||
MhddLog mhddLog = new MhddLog(outputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
MhddLog mhddLog = new MhddLog(outputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
|
||||||
IbgLog ibgLog = new IbgLog(outputPrefix + ".ibg", 0x0008);
|
IbgLog ibgLog = new IbgLog(outputPrefix + ".ibg", 0x0008);
|
||||||
bool ret = outputPlugin.Create(outputPath, dskType, formatOptions, blocks, SECTOR_SIZE);
|
bool ret = outputPlugin.Create(outputPath, dskType, formatOptions, blocks, SECTOR_SIZE);
|
||||||
@@ -888,15 +888,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
throw new ArgumentException(outputPlugin.ErrorMessage);
|
throw new ArgumentException(outputPlugin.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resume.BadBlocks.Sort();
|
||||||
|
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||||
|
|
||||||
outputPlugin.SetDumpHardware(resume.Tries);
|
outputPlugin.SetDumpHardware(resume.Tries);
|
||||||
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
||||||
dumpLog.WriteLine("Closing output file.");
|
dumpLog.WriteLine("Closing output file.");
|
||||||
DicConsole.WriteLine("Closing output file.");
|
DicConsole.WriteLine("Closing output file.");
|
||||||
outputPlugin.Close();
|
outputPlugin.Close();
|
||||||
|
|
||||||
resume.BadBlocks.Sort();
|
|
||||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
|
||||||
|
|
||||||
if(aborted)
|
if(aborted)
|
||||||
{
|
{
|
||||||
dumpLog.WriteLine("Aborted!");
|
dumpLog.WriteLine("Aborted!");
|
||||||
|
|||||||
@@ -646,15 +646,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resume.BadBlocks.Sort();
|
||||||
|
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||||
|
|
||||||
outputPlugin.SetDumpHardware(resume.Tries);
|
outputPlugin.SetDumpHardware(resume.Tries);
|
||||||
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
||||||
dumpLog.WriteLine("Closing output file.");
|
dumpLog.WriteLine("Closing output file.");
|
||||||
DicConsole.WriteLine("Closing output file.");
|
DicConsole.WriteLine("Closing output file.");
|
||||||
outputPlugin.Close();
|
outputPlugin.Close();
|
||||||
|
|
||||||
resume.BadBlocks.Sort();
|
|
||||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
|
||||||
|
|
||||||
if(aborted)
|
if(aborted)
|
||||||
{
|
{
|
||||||
dumpLog.WriteLine("Aborted!");
|
dumpLog.WriteLine("Aborted!");
|
||||||
|
|||||||
@@ -771,15 +771,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
throw new ArgumentException(outputPlugin.ErrorMessage);
|
throw new ArgumentException(outputPlugin.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resume.BadBlocks.Sort();
|
||||||
|
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
||||||
|
|
||||||
outputPlugin.SetDumpHardware(resume.Tries);
|
outputPlugin.SetDumpHardware(resume.Tries);
|
||||||
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
if(preSidecar != null) outputPlugin.SetCicmMetadata(preSidecar);
|
||||||
dumpLog.WriteLine("Closing output file.");
|
dumpLog.WriteLine("Closing output file.");
|
||||||
DicConsole.WriteLine("Closing output file.");
|
DicConsole.WriteLine("Closing output file.");
|
||||||
outputPlugin.Close();
|
outputPlugin.Close();
|
||||||
|
|
||||||
resume.BadBlocks.Sort();
|
|
||||||
currentTry.Extents = ExtentsConverter.ToMetadata(extents);
|
|
||||||
|
|
||||||
if(aborted)
|
if(aborted)
|
||||||
{
|
{
|
||||||
dumpLog.WriteLine("Aborted!");
|
dumpLog.WriteLine("Aborted!");
|
||||||
|
|||||||
Reference in New Issue
Block a user