Make sqlite db path configurable

This commit is contained in:
鱼鱼 2020-05-20 19:44:48 +08:00
parent 208afe9a7e
commit 1eaa1eb901
2 changed files with 6 additions and 1 deletions

View file

@ -264,7 +264,8 @@ namespace TShockAPI
{
if (Config.StorageType.ToLower() == "sqlite")
{
string sql = Path.Combine(SavePath, "tshock.sqlite");
string sql = Path.Combine(SavePath, Config.SqliteDBPath);
Directory.CreateDirectory(Path.GetDirectoryName(sql));
DB = new SqliteConnection(string.Format("uri=file://{0},Version=3", sql));
}
else if (Config.StorageType.ToLower() == "mysql")