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>
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user