Complain properly when adding of files fails.

This commit is contained in:
Andy McFadden 2003-02-09 01:55:26 +00:00
parent 05ffc32db0
commit 18775bbf04

View File

@ -55,10 +55,16 @@ bail:
if (err == kNuErrNone) {
err = NuFlush(pArchive, &flushStatus);
if (err != kNuErrNone && err == kNuErrNone) {
ReportError(err,
"Unable to flush archive changes (status=0x%04lx)",
flushStatus);
if (err != kNuErrNone) {
if (flushStatus & kNuFlushSucceeded) {
ReportError(err,
"Changes were successfully written, but something "
"failed afterward");
} else {
ReportError(err,
"Unable to flush archive changes (status=0x%04lx)",
flushStatus);
}
NuAbort(pArchive);
}
} else {