Create save path first
This commit is contained in:
parent
2e0ce6eae5
commit
a49269cc0c
3 changed files with 5 additions and 11 deletions
|
|
@ -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")))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue