Added more detail for a funky error state.

This commit is contained in:
Andy McFadden 2003-03-10 02:39:33 +00:00
parent 2ba8f133b6
commit ab82bd2b4a

View File

@ -1229,7 +1229,13 @@ Nu_CopyFileSection(NuArchive* pArchive, FILE* dstFp, FILE* srcFp, long length)
readLen = length > kNuGenCompBufSize ? kNuGenCompBufSize : length;
err = Nu_FRead(srcFp, pArchive->compBuf, readLen);
BailError(err);
if (err != kNuErrNone) {
Nu_ReportError(NU_BLOB, err,
"Nu_FRead failed while copying file section "
"(fp=0x%08lx, readLen=%ld, err=%d)\n",
(long) srcFp, readLen, err);
goto bail;
}
err = Nu_FWrite(dstFp, pArchive->compBuf, readLen);
BailError(err);