fixing no unity builds

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-03 20:24:36 -07:00
parent 82c5f80fbd
commit eeed7df429
9 changed files with 33 additions and 3 deletions
@@ -8,6 +8,7 @@
#include "ProjectSettingsContainer.h"
#include <AzCore/IO/SystemFile.h>
#include <AzCore/JSON/prettywriter.h>
#include <AzCore/JSON/stringbuffer.h>
#include <AzCore/XML/rapidxml_print.h>
@@ -9,6 +9,7 @@
#define GM_DEFAULT_HANDSHAKE_H
#include <GridMate/Carrier/Handshake.h>
#include <AzCore/std/string/string.h>
namespace GridMate
{
@@ -12,6 +12,7 @@
#include <AzCore/Math/Crc.h>
#include <AzCore/Math/MathUtils.h>
#include <AzCore/std/string/string.h>
using namespace GridMate;
@@ -12,6 +12,8 @@
#include <GridMate/Containers/list.h>
#include <AzCore/std/string/string.h>
namespace GridMate
{
/**
@@ -10,6 +10,7 @@
#include <GridMate/Types.h>
#include <GridMate/Serialize/Buffer.h>
#include <AzCore/std/string/string.h>
namespace GridMate
{
+1 -1
View File
@@ -378,7 +378,7 @@ typedef struct _finddata_t
extern int _findnext64(intptr_t last, __finddata64_t* pFindData);
extern intptr_t _findfirst64(const char* pFileName, __finddata64_t* pFindData);
extern DWORD GetFileAttributes(LPCSTR lpFileName);
extern DWORD GetFileAttributesW(LPCWSTR lpFileName);
extern const bool GetFilenameNoCase(const char* file, char*, const bool cCreateNew = false);
+23 -2
View File
@@ -1648,12 +1648,33 @@ DWORD GetFileAttributes(LPCWSTR lpFileNameW)
uint32 CryGetFileAttributes(const char* lpFileName)
{
AZStd::string fn = lpFileName;
adaptFilenameToLinux(fn);
const char* buffer = fn.c_str();
return GetFileAttributes(buffer);
struct stat fileStats;
const int success = stat(buffer, &fileStats);
if (success == -1)
{
char adjustedFilename[MAX_PATH];
GetFilenameNoCase(buffer, adjustedFilename);
if (stat(adjustedFilename, &fileStats) == -1)
{
return (DWORD)INVALID_FILE_ATTRIBUTES;
}
}
DWORD ret = 0;
const int acc = (fileStats.st_mode & S_IWRITE);
if (acc != 0)
{
if (S_ISDIR(fileStats.st_mode) != 0)
{
ret |= FILE_ATTRIBUTE_DIRECTORY;
}
}
return (ret == 0) ? FILE_ATTRIBUTE_NORMAL : ret;//return file attribute normal as the default value, must only be set if no other attributes have been found
}
__finddata64_t::~__finddata64_t()