Fixed nasty bug if the save folder didn't exist.
This commit is contained in:
parent
e81982569c
commit
4fe2e5ee34
1 changed files with 4 additions and 0 deletions
|
|
@ -97,6 +97,10 @@ namespace TShockAPI
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
if (!Directory.Exists(SavePath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(SavePath);
|
||||||
|
}
|
||||||
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
|
if (File.Exists(Path.Combine(SavePath, "tshock.pid")))
|
||||||
{
|
{
|
||||||
Log.ConsoleInfo("TShock was improperly shut down. Deleting invalid pid file...");
|
Log.ConsoleInfo("TShock was improperly shut down. Deleting invalid pid file...");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue