From dbf47b585f86942ac3c1b721f598e3e8a1856053 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sat, 8 Feb 2003 22:19:50 +0000 Subject: [PATCH] Added "abort" to progress states, so user cancellations can be reported properly. --- nufxlib-0/Lzw.c | 3 ++- nufxlib-0/Thread.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nufxlib-0/Lzw.c b/nufxlib-0/Lzw.c index 3af0bf3..4f37eac 100644 --- a/nufxlib-0/Lzw.c +++ b/nufxlib-0/Lzw.c @@ -1530,7 +1530,8 @@ Nu_ExpandLZW(NuArchive* pArchive, const NuRecord* pRecord, /* write the data, possibly doing an EOL conversion */ err = Nu_FunnelWrite(pArchive, pFunnel, writeBuf, writeLen); if (err != kNuErrNone) { - Nu_ReportError(NU_BLOB, err, "unable to write output"); + if (err != kNuErrAborted) + Nu_ReportError(NU_BLOB, err, "unable to write output"); goto bail; } diff --git a/nufxlib-0/Thread.c b/nufxlib-0/Thread.c index c392295..7ec91f4 100644 --- a/nufxlib-0/Thread.c +++ b/nufxlib-0/Thread.c @@ -748,6 +748,8 @@ bail: /* send a final progress message, indicating failure */ if (err == kNuErrSkipped) pProgressData->state = kNuProgressSkipped; + else if (err == kNuErrAborted) + pProgressData->state = kNuProgressAborted; else pProgressData->state = kNuProgressFailed; (void) Nu_SendInitialProgress(pArchive, pProgressData);