This commit is contained in:
@@ -42,6 +42,7 @@ namespace Elwig.Helpers {
|
||||
|
||||
public bool Debug;
|
||||
public string DatabaseFile = App.DataPath + "database.sqlite3";
|
||||
public bool DatabaseBackup = true;
|
||||
public string? DatabaseLog = null;
|
||||
public string? Branch = null;
|
||||
public WeighingMode? WeighingMode;
|
||||
@@ -76,6 +77,8 @@ namespace Elwig.Helpers {
|
||||
var config = new ConfigurationBuilder().AddIniFile(FileName).Build();
|
||||
|
||||
DatabaseFile = Path.Combine(Path.GetDirectoryName(FileName) ?? App.DataPath, config["database:file"] ?? "database.sqlite3");
|
||||
var backup = config["database:backup"];
|
||||
DatabaseBackup = backup == null || TrueValues.Contains(backup.ToLower());
|
||||
var log = config["database:log"];
|
||||
DatabaseLog = log != null ? Path.Combine(Path.GetDirectoryName(FileName) ?? App.DataPath, log) : null;
|
||||
Branch = config["general:branch"];
|
||||
|
||||
Reference in New Issue
Block a user