mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Ensure only unique bad blocks are saved in resume file. Fixes #381
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Aaru.CommonTypes.Extents;
|
||||
using Aaru.Core.Logging;
|
||||
using Schemas;
|
||||
@@ -93,6 +94,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
if(_dev.Manufacturer.ToLowerInvariant() == "insite")
|
||||
{
|
||||
_resume.BadBlocks.Add(i);
|
||||
_resume.BadBlocks = _resume.BadBlocks.Distinct().ToList();
|
||||
_resume.NextBlock++;
|
||||
_aborted = true;
|
||||
|
||||
@@ -141,6 +143,8 @@ namespace Aaru.Core.Devices.Dumping
|
||||
timeSpeedStart = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
_resume.BadBlocks = _resume.BadBlocks.Distinct().ToList();
|
||||
|
||||
EndProgress?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user