diff --git a/Config.cs b/Config.cs index 74a65e4..b896468 100644 --- a/Config.cs +++ b/Config.cs @@ -2,7 +2,7 @@ namespace S2PK; public class Config { - public Destination Games { get; set; } = new(); + public Destinations Paths { get; set; } = new(); /// /// Loads the configuration from the specified file path. @@ -13,11 +13,11 @@ public class Config { var file = File.ReadAllText(path); var config = Toml.ToModel(file); - return config; + return config ?? throw new FileNotFoundException("Configuration file not found."); } } -public class Destination +public class Destinations { public string Sims2 { get; set; } = string.Empty; public string Sims3 { get; set; } = string.Empty; diff --git a/s2pk.toml.sample b/s2pk.toml.sample index 950c7a2..3399cb5 100644 --- a/s2pk.toml.sample +++ b/s2pk.toml.sample @@ -1,3 +1,3 @@ -[games] +[paths] sims2 ≡ "path/to/sims2" sims3 ≡ "path/to/sims3"