From 20187bb8726d8b3f0b7b5583e7f6a32504d191b7 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Wed, 13 Jul 2011 02:24:46 -0600 Subject: [PATCH] Fixed nasty bug if the save folder didn't exist. --- TShockAPI/TShock.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 37373698..ba855bc0 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -97,6 +97,10 @@ namespace TShockAPI public override void Initialize() { + if (!Directory.Exists(SavePath)) + { + Directory.CreateDirectory(SavePath); + } if (File.Exists(Path.Combine(SavePath, "tshock.pid"))) { Log.ConsoleInfo("TShock was improperly shut down. Deleting invalid pid file...");