mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Allow MediaScan to be aborted.
This commit is contained in:
@@ -119,6 +119,11 @@ namespace DiscImageChef.Commands
|
||||
scanner.PulseProgress += Progress.PulseProgress;
|
||||
scanner.InitProgress += Progress.InitProgress;
|
||||
scanner.EndProgress += Progress.EndProgress;
|
||||
System.Console.CancelKeyPress += (sender, e) =>
|
||||
{
|
||||
e.Cancel = true;
|
||||
scanner.Abort();
|
||||
};
|
||||
ScanResults results = scanner.Scan();
|
||||
|
||||
DicConsole.WriteLine("Took a total of {0} seconds ({1} processing commands).", results.TotalTime,
|
||||
|
||||
Reference in New Issue
Block a user