Create save path first
This commit is contained in:
parent
2e0ce6eae5
commit
a49269cc0c
3 changed files with 5 additions and 11 deletions
|
|
@ -129,11 +129,6 @@ namespace TShockAPI.DB
|
|||
groups = new List<Group>();
|
||||
groups.Add(new SuperAdminGroup());
|
||||
|
||||
if (TShock.Users == null)
|
||||
{
|
||||
TShock.Users = new UserManager(TShock.DB);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (var com = database.CreateCommand())
|
||||
|
|
|
|||
|
|
@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
|
|||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("3.1.0.0722")]
|
||||
[assembly: AssemblyFileVersion("3.1.0.0722")]
|
||||
[assembly: AssemblyVersion("3.1.0.0723")]
|
||||
[assembly: AssemblyFileVersion("3.1.0.0723")]
|
||||
|
|
|
|||
|
|
@ -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