From f65698fcb62311c11b2ba81b7cea227153d7f23f Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Wed, 30 Apr 2025 09:14:07 -0400 Subject: [PATCH] Renamed games option to paths --- Config.cs | 6 +++--- s2pk.toml.sample | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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"