增加List处理功能

This commit is contained in:
2025-09-04 14:30:09 +08:00
parent 80390e48a7
commit 4235742d87
13 changed files with 615 additions and 82 deletions
+10 -1
View File
@@ -4,6 +4,7 @@
#include "libEncrypt_SHA256.h"
#include "libNPK_FileStream.h"
#include "libNPK_Utils.h"
#include "libNPK_FileList.h"
#include <assert.h>
@@ -302,7 +303,15 @@ IFileList* CNPKFile::generateFullInfoList(void)
{
fullInfo.fileCRC = 0;
}
pFileList->addFileNode(fullInfo); // Add file item to the list
// Add file item to the list
if (!((NPKFileList*)pFileList)->addFileNode(fullInfo, false))
{
//duplicate key name, error!
closeFileStream(pFileStream);
destoryFileList(pFileList);
setLastError(NPK_ERR_INVALID_FILE_FORMAT, "Duplicate keyname in NPK file");
return nullptr;
}
}
return pFileList;
}