Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
+1
View File
@@ -103,6 +103,7 @@ namespace FileUtil
if (ftimeModify == nullptr && ftimeCreate == nullptr && ftimeAccess == nullptr)
{
FindClose(hFind);
return true;
}
+1 -1
View File
@@ -114,7 +114,7 @@ PakSystemFile* PakSystem::Open(const char* a_path, const char* a_mode)
dirToSearch = PathHelpers::GetDirectory(dirToSearch);
AZ::IO::LocalFileIO localFileIO;
bool foundOK = localFileIO.FindFiles(dirToSearch.c_str(), "*.pak", [&](const char* filePath) -> bool
localFileIO.FindFiles(dirToSearch.c_str(), "*.pak", [&](const char* filePath) -> bool
{
const string foundFilename(filePath);
if (StringHelpers::EqualsIgnoreCase(PathHelpers::FindExtension(foundFilename), "pak"))
@@ -288,7 +288,10 @@ ZipDir::CachePtr ZipDir::CacheFactory::MakeCache (const char* szFile)
m_f = NULL; // we don't own the file anymore - it's in possession of the cache instance
// try to serialize into the memory
size_t nSizeSerialized = m_treeFileEntries.Serialize (cache->GetRoot());
#if !defined(NDEBUG)
size_t nSizeSerialized =
#endif
m_treeFileEntries.Serialize (cache->GetRoot());
assert (nSizeSerialized == nSizeRequired);
@@ -523,10 +526,9 @@ bool ZipDir::CacheFactory::BuildFileEntryMap()
{
case ZipFile::EXTRA_NTFS:
{
ZipFile::ExtraNTFSHeader& ntfsHdr = *(ZipFile::ExtraNTFSHeader*)pAttrData;
extra.nLastModifyTime = *(uint64*)(pAttrData + sizeof(ZipFile::ExtraNTFSHeader));
uint64 accTime = *(uint64*)(pAttrData + sizeof(ZipFile::ExtraNTFSHeader) + 8);
uint64 crtTime = *(uint64*)(pAttrData + sizeof(ZipFile::ExtraNTFSHeader) + 16);
//uint64 accTime = *(uint64*)(pAttrData + sizeof(ZipFile::ExtraNTFSHeader) + 8);
//uint64 crtTime = *(uint64*)(pAttrData + sizeof(ZipFile::ExtraNTFSHeader) + 16);
}
break;
}
@@ -1699,7 +1699,10 @@ bool ZipDir::CacheRW::WriteCDR(FILE* fTarget, bool encryptCDR)
//arrFiles.SortByFileOffset();
size_t nSizeCDR = arrFiles.GetStats().nSizeCDR;
void* pCDR = malloc(nSizeCDR);
size_t nSizeCDRSerialized = arrFiles.MakeZipCDR(m_lCDROffset, pCDR, encryptCDR);
#if !defined(NDEBUG)
size_t nSizeCDRSerialized =
#endif
arrFiles.MakeZipCDR(m_lCDROffset, pCDR, encryptCDR);
assert (nSizeCDRSerialized == nSizeCDR);
if (encryptCDR)
@@ -1931,9 +1934,6 @@ bool ZipDir::CacheRW::EncryptArchive(EncryptionChange change, IEncryptPredicate*
FileRecordList arrFiles(GetRoot());
arrFiles.SortByFileOffset();
// the total size of data in the queue
unsigned nQueueSize = 0;
size_t unusedSpace = 0;
size_t lastDataEnd = 0;
@@ -1974,8 +1974,6 @@ bool ZipDir::CacheRW::EncryptArchive(EncryptionChange change, IEncryptPredicate*
return false;
}
bool methodChanged = false;
ZipFile::ushort oldMethod = entry->nMethod;
ZipFile::ushort newMethod = oldMethod;
if (change == ENCRYPT)