diff --git a/nufxlib-0/ChangeLog.txt b/nufxlib-0/ChangeLog.txt index c5402f7..761ed1a 100644 --- a/nufxlib-0/ChangeLog.txt +++ b/nufxlib-0/ChangeLog.txt @@ -1,3 +1,7 @@ +2003/02/22 fadden + - Turn off EOL conversion when extracting disk images. + - Added NuTestRecord(). + 2003/02/18 fadden - Added "original pathname" fields to NuFileDetails and NuErrorStatus. - Changed callback setters to return NuCallback instead of NuError. diff --git a/nufxlib-0/Deferred.c b/nufxlib-0/Deferred.c index ed7bb30..4b3865f 100644 --- a/nufxlib-0/Deferred.c +++ b/nufxlib-0/Deferred.c @@ -378,8 +378,8 @@ Nu_CopyArchiveRecord(NuArchive* pArchive, NuRecord* pRecord) BailError(err); offsetAdjust = outputOffset - pRecord->fileOffset; - DBUG(("--- Copying record '%s' (adj=%ld)\n", pRecord->filename, - offsetAdjust)); + DBUG(("--- Copying record '%s' (curOff=%ld adj=%ld)\n", pRecord->filename, + outputOffset, offsetAdjust)); /* seek to the start point in the source file, and copy the whole thing */ err = Nu_FSeek(pArchive->archiveFp, pRecord->fileOffset, SEEK_SET); @@ -399,6 +399,7 @@ Nu_CopyArchiveRecord(NuArchive* pArchive, NuRecord* pRecord) Assert(outputOffset + pRecord->recHeaderLength + pRecord->totalCompLength == (ulong)ftell(pArchive->tmpFp)); + Assert(pRecord->fileOffset == outputOffset); bail: return err; @@ -1211,6 +1212,11 @@ Nu_ConstructArchiveRecord(NuArchive* pArchive, NuRecord* pRecord) err = Nu_FSeek(pArchive->tmpFp, finalOffset, SEEK_SET); BailError(err); + /* update the record's fileOffset to reflect its new position */ + DBUG(("+++ record shifted by %ld bytes\n", + initialOffset - pRecord->fileOffset)); + pRecord->fileOffset = initialOffset; + bail: if (err == kNuErrSkipped) { /*