Allow MediaScan to be aborted.

This commit is contained in:
2019-04-21 00:59:01 +01:00
parent 359efb369c
commit 66108773d2
6 changed files with 16 additions and 14 deletions

View File

@@ -46,7 +46,6 @@ namespace DiscImageChef.Core.Devices.Scanning
public ScanResults SecureDigital()
{
ScanResults results = new ScanResults();
bool aborted;
byte[] cmdBuf;
bool sense;
results.Blocks = 0;
@@ -146,9 +145,6 @@ namespace DiscImageChef.Core.Devices.Scanning
Random rnd = new Random();
aborted = false;
System.Console.CancelKeyPress += (sender, e) => e.Cancel = aborted = true;
UpdateStatus?.Invoke($"Reading {blocksToRead} sectors at a time.");
MhddLog mhddLog = new MhddLog(mhddLogPath, dev, results.Blocks, blockSize, blocksToRead);