Create save path first

This commit is contained in:
high 2011-07-23 00:50:30 -04:00
parent 2e0ce6eae5
commit a49269cc0c
3 changed files with 5 additions and 11 deletions

View file

@ -100,6 +100,9 @@ namespace TShockAPI
public override void Initialize()
{
if (!Directory.Exists(SavePath))
Directory.CreateDirectory(SavePath);
#if DEBUG
Log.Initialize(Path.Combine(SavePath, "log.txt"), LogLevel.All, false);
#else
@ -107,10 +110,6 @@ namespace TShockAPI
#endif
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
if (!Directory.Exists(SavePath))
{
Directory.CreateDirectory(SavePath);
}
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
{