mirror of
https://github.com/fadden/nulib2.git
synced 2025-04-09 15:38:22 +00:00
Fixed a bug that cropped up when trying to add files after deleting all
existing entries.
This commit is contained in:
parent
1ba9153d5c
commit
c72e15d854
@ -1,3 +1,7 @@
|
||||
2004/09/25 fadden
|
||||
- Fixed: attempting to add files after deleting *all* entries in an
|
||||
archive would fail.
|
||||
|
||||
2004/09/20 fadden
|
||||
- Corrected behavior after flush when original archive can't be
|
||||
deleted.
|
||||
|
@ -1218,7 +1218,7 @@ Nu_ConstructArchiveRecord(NuArchive* pArchive, NuRecord* pRecord)
|
||||
err = Nu_WriteRecordHeader(pArchive, pRecord, pArchive->tmpFp);
|
||||
BailError(err);
|
||||
|
||||
Assert(newHeaderSize == pRecord->recHeaderLength);
|
||||
Assert(newHeaderSize == (int) pRecord->recHeaderLength);
|
||||
|
||||
/*
|
||||
* Seek forward once again, so we are positioned at the correct
|
||||
|
@ -541,13 +541,9 @@ Nu_RecordSet_MoveAllRecords(NuArchive* pArchive, NuRecordSet* pDstSet,
|
||||
Assert(pDstSet != nil);
|
||||
Assert(pSrcSet != nil);
|
||||
|
||||
#if 0 /* this is bogus -- empty set != unloaded set */
|
||||
if (!Nu_RecordSet_GetNumRecords(pSrcSet)) /* nothing to do? */
|
||||
return kNuErrNone;
|
||||
#endif
|
||||
|
||||
/* move records over */
|
||||
if (Nu_RecordSet_GetNumRecords(pSrcSet)) {
|
||||
Assert(pSrcSet->loaded);
|
||||
Assert(pSrcSet->nuRecordHead != nil);
|
||||
Assert(pSrcSet->nuRecordTail != nil);
|
||||
if (pDstSet->nuRecordHead == nil) {
|
||||
@ -569,6 +565,9 @@ Nu_RecordSet_MoveAllRecords(NuArchive* pArchive, NuRecordSet* pDstSet,
|
||||
/* no records in src set */
|
||||
Assert(pSrcSet->nuRecordHead == nil);
|
||||
Assert(pSrcSet->nuRecordTail == nil);
|
||||
|
||||
if (pSrcSet->loaded)
|
||||
pDstSet->loaded = true;
|
||||
}
|
||||
|
||||
/* nuke all pointers in original list */
|
||||
|
Loading…
x
Reference in New Issue
Block a user