mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Implement abortion in image convertion process.
This commit is contained in:
@@ -9,6 +9,8 @@ public partial class Convert
|
||||
{
|
||||
ErrorNumber ConvertSectors(bool useLong, bool isTape)
|
||||
{
|
||||
if(_aborted) return ErrorNumber.NoError;
|
||||
|
||||
InitProgress?.Invoke();
|
||||
ErrorNumber errno = ErrorNumber.NoError;
|
||||
ulong doneSectors = 0;
|
||||
@@ -133,6 +135,8 @@ public partial class Convert
|
||||
|
||||
ErrorNumber ConvertSectorsTags(bool useLong)
|
||||
{
|
||||
if(_aborted) return ErrorNumber.NoError;
|
||||
|
||||
foreach(SectorTagType tag in _inputImage.Info.ReadableSectorTags.TakeWhile(_ => useLong))
|
||||
{
|
||||
switch(tag)
|
||||
|
||||
Reference in New Issue
Block a user