mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🐛Fix error sector list overflowing total sectors on dump.
This commit is contained in:
@@ -272,6 +272,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(i + skip > blocks) skip = (uint)(blocks - i);
|
||||||
|
|
||||||
for(ulong b = i; b < i + skip; b++) resume.BadBlocks.Add(b);
|
for(ulong b = i; b < i + skip; b++) resume.BadBlocks.Add(b);
|
||||||
|
|
||||||
mhddLog.Write(i, duration < 500 ? 65535 : duration);
|
mhddLog.Write(i, duration < 500 ? 65535 : duration);
|
||||||
|
|||||||
@@ -731,6 +731,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
// TODO: Reset device after X errors
|
// TODO: Reset device after X errors
|
||||||
if(stopOnError) return; // TODO: Return more cleanly
|
if(stopOnError) return; // TODO: Return more cleanly
|
||||||
|
|
||||||
|
if(i + skip > blocks) skip = (uint)(blocks - i);
|
||||||
|
|
||||||
// Write empty data
|
// Write empty data
|
||||||
DateTime writeStart = DateTime.Now;
|
DateTime writeStart = DateTime.Now;
|
||||||
if(supportedSubchannel != MmcSubchannel.None)
|
if(supportedSubchannel != MmcSubchannel.None)
|
||||||
|
|||||||
@@ -385,6 +385,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
// TODO: Reset device after X errors
|
// TODO: Reset device after X errors
|
||||||
if(stopOnError) return; // TODO: Return more cleanly
|
if(stopOnError) return; // TODO: Return more cleanly
|
||||||
|
|
||||||
|
if(i + skip > blocks) skip = (uint)(blocks - i);
|
||||||
|
|
||||||
// Write empty data
|
// Write empty data
|
||||||
DateTime writeStart = DateTime.Now;
|
DateTime writeStart = DateTime.Now;
|
||||||
outputPlugin.WriteSectors(new byte[blockSize * skip], i, skip);
|
outputPlugin.WriteSectors(new byte[blockSize * skip], i, skip);
|
||||||
|
|||||||
@@ -317,6 +317,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(i + skip > blocks) skip = (uint)(blocks - i);
|
||||||
|
|
||||||
for(ulong b = i; b < i + skip; b++) resume.BadBlocks.Add(b);
|
for(ulong b = i; b < i + skip; b++) resume.BadBlocks.Add(b);
|
||||||
|
|
||||||
mhddLog.Write(i, duration < 500 ? 65535 : duration);
|
mhddLog.Write(i, duration < 500 ? 65535 : duration);
|
||||||
|
|||||||
@@ -437,6 +437,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
// TODO: Reset device after X errors
|
// TODO: Reset device after X errors
|
||||||
if(stopOnError) return; // TODO: Return more cleanly
|
if(stopOnError) return; // TODO: Return more cleanly
|
||||||
|
|
||||||
|
if(i + skip > blocks) skip = (uint)(blocks - i);
|
||||||
|
|
||||||
// Write empty data
|
// Write empty data
|
||||||
DateTime writeStart = DateTime.Now;
|
DateTime writeStart = DateTime.Now;
|
||||||
outputPlugin.WriteSectors(new byte[BLOCK_SIZE * skip], i, skip);
|
outputPlugin.WriteSectors(new byte[BLOCK_SIZE * skip], i, skip);
|
||||||
|
|||||||
Reference in New Issue
Block a user