Fixed nasty bug if the save folder didn't exist.
This commit is contained in:
parent
2608ca0779
commit
20187bb872
1 changed files with 4 additions and 0 deletions
|
|
@ -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...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue