From a55d49833eb1485bb473f6f10648def1a0f2f847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Mon, 1 Jan 2024 17:17:24 +0100 Subject: [PATCH] Use `IStorage::FormatTmpPath` function for editor map names --- src/game/editor/mapitems/map_io.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/editor/mapitems/map_io.cpp b/src/game/editor/mapitems/map_io.cpp index 208918d31..a5bc4e659 100644 --- a/src/game/editor/mapitems/map_io.cpp +++ b/src/game/editor/mapitems/map_io.cpp @@ -36,7 +36,8 @@ struct CSoundSource_DEPRECATED bool CEditorMap::Save(const char *pFileName) { 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]; str_format(aBuf, sizeof(aBuf), "saving to '%s'...", aFileNameTmp); m_pEditor->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "editor", aBuf);