Fix level creation on Linux (#3488)

* Fix level creation on Linux

Creating a new level on linux would fail due to backslashes being used in mkdir.
Fixed the slashes to use the AZ_CORRECT_FILESYSTEM_SEPARATOR.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Removed extra line that wasn't needed

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
monroegm-disable-blank-issue-2
amzn-phist 4 years ago committed by GitHub
parent b9daf7f7c3
commit db1a89a492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1221,15 +1221,14 @@ bool CFileUtil::CreatePath(const QString& strPath)
if (!strDriveLetter.isEmpty())
{
strCurrentDirectoryPath = strDriveLetter;
strCurrentDirectoryPath += "\\";
strCurrentDirectoryPath += AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING;
}
nTotalPathQueueElements = cstrDirectoryQueue.size();
for (nCurrentPathQueue = 0; nCurrentPathQueue < nTotalPathQueueElements; ++nCurrentPathQueue)
{
strCurrentDirectoryPath += cstrDirectoryQueue[static_cast<int>(nCurrentPathQueue)];
strCurrentDirectoryPath += "\\";
strCurrentDirectoryPath += AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING;
// The value which will go out of this loop is the result of the attempt to create the
// last directory, only.
@ -2158,7 +2157,6 @@ uint32 CFileUtil::GetAttributes(const char* filename, bool bUseSourceControl /*=
return SCC_FILE_ATTRIBUTE_READONLY | SCC_FILE_ATTRIBUTE_INPAK;
}
const char* adjustedFile = file.GetAdjustedFilename();
if (!AZ::IO::SystemFile::Exists(adjustedFile))
{

Loading…
Cancel
Save