Use IStorage::FormatTmpPath function for editor map names

This commit is contained in:
Robert Müller 2024-01-01 17:17:24 +01:00
parent 424d789f47
commit a55d49833e

View file

@ -36,7 +36,8 @@ struct CSoundSource_DEPRECATED
bool CEditorMap::Save(const char *pFileName) bool CEditorMap::Save(const char *pFileName)
{ {
char aFileNameTmp[IO_MAX_PATH_LENGTH]; char aFileNameTmp[IO_MAX_PATH_LENGTH];
str_format(aFileNameTmp, sizeof(aFileNameTmp), "%s.%d.tmp", pFileName, pid()); IStorage::FormatTmpPath(aFileNameTmp, sizeof(aFileNameTmp), pFileName);
char aBuf[IO_MAX_PATH_LENGTH + 64]; char aBuf[IO_MAX_PATH_LENGTH + 64];
str_format(aBuf, sizeof(aBuf), "saving to '%s'...", aFileNameTmp); str_format(aBuf, sizeof(aBuf), "saving to '%s'...", aFileNameTmp);
m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "editor", aBuf); m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "editor", aBuf);