Fixed nasty bug if the save folder didn't exist.

This commit is contained in:
Lucas Nicodemus 2011-07-13 02:24:46 -06:00
parent 2608ca0779
commit 20187bb872

View file

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