mirror of
https://github.com/fadden/nulib2.git
synced 2024-05-28 08:41:29 +00:00
Added "abort" to progress states, so user cancellations can be reported
properly.
This commit is contained in:
parent
6f418b9d5c
commit
dbf47b585f
|
@ -1530,7 +1530,8 @@ Nu_ExpandLZW(NuArchive* pArchive, const NuRecord* pRecord,
|
||||||
/* write the data, possibly doing an EOL conversion */
|
/* write the data, possibly doing an EOL conversion */
|
||||||
err = Nu_FunnelWrite(pArchive, pFunnel, writeBuf, writeLen);
|
err = Nu_FunnelWrite(pArchive, pFunnel, writeBuf, writeLen);
|
||||||
if (err != kNuErrNone) {
|
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;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -748,6 +748,8 @@ bail:
|
||||||
/* send a final progress message, indicating failure */
|
/* send a final progress message, indicating failure */
|
||||||
if (err == kNuErrSkipped)
|
if (err == kNuErrSkipped)
|
||||||
pProgressData->state = kNuProgressSkipped;
|
pProgressData->state = kNuProgressSkipped;
|
||||||
|
else if (err == kNuErrAborted)
|
||||||
|
pProgressData->state = kNuProgressAborted;
|
||||||
else
|
else
|
||||||
pProgressData->state = kNuProgressFailed;
|
pProgressData->state = kNuProgressFailed;
|
||||||
(void) Nu_SendInitialProgress(pArchive, pProgressData);
|
(void) Nu_SendInitialProgress(pArchive, pProgressData);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user