Fix failed archive tests on linux and remove trait
- Change the test Archive Folder name, Extract Folder Name, and File List file to be all lowercase to prevent the 'ResolvePath' function in LocalFileIO when executed to cause issues on case sensitive file systems (#6277) - Fix memory corruption in profile builds on Linux when using AZ::IO::PathView by using AZ::IO::FixedMaxPath instead Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
This commit is contained in:
@@ -158,16 +158,16 @@ namespace AzToolsFramework
|
||||
|
||||
bool success = true;
|
||||
AZStd::vector<char> fileBuffer;
|
||||
const AZ::IO::Path workingPath{ dirToArchive };
|
||||
const AZ::IO::FixedMaxPath workingPath{ dirToArchive };
|
||||
|
||||
for (const auto& fileName : foundFiles.GetValue())
|
||||
{
|
||||
bool thisSuccess = false;
|
||||
|
||||
AZ::IO::PathView relativePath = AZ::IO::PathView{ fileName }.LexicallyRelative(workingPath);
|
||||
AZ::IO::FixedMaxPath relativePath = AZ::IO::FixedMaxPath{ fileName }.LexicallyRelative(workingPath);
|
||||
AZ::IO::FixedMaxPath fullPath = (workingPath / relativePath);
|
||||
|
||||
AZ::IO::Path fullPath = (workingPath / relativePath);
|
||||
if (ArchiveUtils::ReadFile(fullPath, AZ::IO::OpenMode::ModeRead, fileBuffer))
|
||||
if (ArchiveUtils::ReadFile(static_cast<AZ::IO::PathView>(fullPath), AZ::IO::OpenMode::ModeRead, fileBuffer))
|
||||
{
|
||||
int result = archive->UpdateFile(
|
||||
relativePath.Native(), fileBuffer.data(), fileBuffer.size(), s_compressionMethod,
|
||||
|
||||
Reference in New Issue
Block a user