Config: Use Path.Combine() instead of GetAbsolutePath()
This commit is contained in:
		@@ -24,9 +24,9 @@ namespace Elwig.Helpers {
 | 
			
		||||
        public void Read() {
 | 
			
		||||
            var config = new ConfigurationBuilder().AddIniFile(FileName).Build();
 | 
			
		||||
 | 
			
		||||
            DatabaseFile = Utils.GetAbsolutePath(config["database:file"] ?? "database.sqlite3", App.DataPath);
 | 
			
		||||
            DatabaseFile = Path.Combine(App.DataPath, config["database:file"] ?? "database.sqlite3");
 | 
			
		||||
            var log = config["database:log"];
 | 
			
		||||
            DatabaseLog = log != null ? Utils.GetAbsolutePath(log, App.DataPath) : null;
 | 
			
		||||
            DatabaseLog = log != null ? Path.Combine(App.DataPath, log) : null;
 | 
			
		||||
            Branch = config["general:branch"];
 | 
			
		||||
            Debug = trueValues.Contains(config["general:debug"]?.ToLower());
 | 
			
		||||
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace Elwig.Helpers {
 | 
			
		||||
            Scales = ScaleList;
 | 
			
		||||
            foreach (var s in scales) {
 | 
			
		||||
                string? scaleLog = config[$"scale.{s}:log"];
 | 
			
		||||
                if (scaleLog != null) scaleLog = Utils.GetAbsolutePath(scaleLog, App.DataPath);
 | 
			
		||||
                if (scaleLog != null) scaleLog = Path.Combine(App.DataPath, scaleLog);
 | 
			
		||||
                ScaleList.Add([
 | 
			
		||||
                    s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
 | 
			
		||||
                    config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"], scaleLog
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user