From 850d9c842b83cb8278c600c2f4bc564f67c3de54 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 14 Jan 2024 00:42:14 +0100 Subject: [PATCH] Fix Missing Directory --- OpenCS2hock/OpenCS2hock.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenCS2hock/OpenCS2hock.cs b/OpenCS2hock/OpenCS2hock.cs index 4d6763a..456b866 100644 --- a/OpenCS2hock/OpenCS2hock.cs +++ b/OpenCS2hock/OpenCS2hock.cs @@ -59,6 +59,7 @@ public class OpenCS2hock private void OnGSIMessage(string content) { + Directory.CreateDirectory(Path.Combine(Environment.CurrentDirectory, "CS2Events")); string fileName = Path.Combine(Environment.CurrentDirectory, "CS2Events" ,$"{DateTime.Now.ToLongTimeString().Replace(':','.')}.json"); File.WriteAllText(fileName, content); _cs2MessageHandler.HandleCS2Message(content);