Implement abortion in image convertion process.

This commit is contained in:
2025-11-25 19:47:40 +00:00
parent 37b8eeaf4f
commit 5febb2012d
10 changed files with 106 additions and 39 deletions

View File

@@ -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)