Fix tests in Linux and discover path comparison problem in Windows (fixed)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-07-14 20:24:15 -07:00
parent 4a5ac0e204
commit ae46eea1e8
6 changed files with 55 additions and 29 deletions
@@ -279,14 +279,11 @@ namespace AZ
return SystemFile::Exists(resolvedPath);
}
void LocalFileIO::CheckInvalidWrite(const char* path)
void LocalFileIO::CheckInvalidWrite([[maybe_unused]] const char* path)
{
(void)path;
#if defined(AZ_ENABLE_TRACING)
const char* assetsAlias = GetAlias("@assets@");
if (((path) && (assetsAlias) && (azstrnicmp(path, assetsAlias, strlen(assetsAlias)) == 0)))
if (path && assetsAlias && AZ::IO::PathView(path).IsRelativeTo(assetsAlias))
{
AZ_Error("FileIO", false, "You may not alter data inside the asset cache. Please check the call stack and consider writing into the source asset folder instead.\n"
"Attempted write location: %s", path);