From dca6c8920d04ccea5f4c47b7e3445fa33b688893 Mon Sep 17 00:00:00 2001 From: lionarius Date: Thu, 9 Jan 2025 07:29:09 +0300 Subject: [PATCH] . --- DoomDeathmatch/src/Script/Score/ScoreTable.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DoomDeathmatch/src/Script/Score/ScoreTable.cs b/DoomDeathmatch/src/Script/Score/ScoreTable.cs index 58e9e50..c66c61c 100644 --- a/DoomDeathmatch/src/Script/Score/ScoreTable.cs +++ b/DoomDeathmatch/src/Script/Score/ScoreTable.cs @@ -38,6 +38,12 @@ public class ScoreTable public static void Save(ScoreTable parTable, string parPath) { + var directory = Path.GetDirectoryName(parPath); + if (directory != null && !Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + using var stream = File.Create(parPath); JsonSerializer.Serialize(stream, parTable, OPTIONS); }