Fix Missing Directory

This commit is contained in:
glax 2024-01-14 00:42:14 +01:00
parent ceb7fb087c
commit 850d9c842b

View File

@ -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);