diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-20 00:00:45 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-20 00:00:45 -0400 |
commit | 49870671cfbeb5c0bb12ca159fc7f4f7474d2be9 (patch) | |
tree | b3e458e70664b856c69f478c8ec2e988f1aab9ab /src | |
parent | 498a950be80a28a537c71d4b4e094bc554fcbeb3 (diff) | |
download | SMAPI-49870671cfbeb5c0bb12ca159fc7f4f7474d2be9.tar.gz SMAPI-49870671cfbeb5c0bb12ca159fc7f4f7474d2be9.tar.bz2 SMAPI-49870671cfbeb5c0bb12ca159fc7f4f7474d2be9.zip |
fix broken path in installer (#582)
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.Installer/Framework/InstallerPaths.cs | 4 | ||||
-rw-r--r-- | src/SMAPI.Installer/InteractiveInstaller.cs | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/SMAPI.Installer/Framework/InstallerPaths.cs b/src/SMAPI.Installer/Framework/InstallerPaths.cs index d212876a..65e7699b 100644 --- a/src/SMAPI.Installer/Framework/InstallerPaths.cs +++ b/src/SMAPI.Installer/Framework/InstallerPaths.cs @@ -26,6 +26,9 @@ namespace StardewModdingAPI.Installer.Framework /// <summary>The full path to the directory into which to install mods.</summary> public string ModsPath => this.ModsDir.FullName; + /// <summary>The full path to SMAPI's internal configuration file.</summary> + public string ApiConfigPath { get; } + /// <summary>The full path to the installed SMAPI executable file.</summary> public string ExecutablePath { get; } @@ -56,6 +59,7 @@ namespace StardewModdingAPI.Installer.Framework this.UnixLauncherPath = Path.Combine(gameDir.FullName, "StardewValley"); this.UnixSmapiLauncherPath = Path.Combine(gameDir.FullName, "StardewModdingAPI"); this.UnixBackupLauncherPath = Path.Combine(gameDir.FullName, "StardewValley-original"); + this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "StardewModdingAPI.config.json"); } } } diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs index 565ad732..7f7acb0b 100644 --- a/src/SMAPI.Installer/InteractiveInstaller.cs +++ b/src/SMAPI.Installer/InteractiveInstaller.cs @@ -505,11 +505,10 @@ namespace StardewModdingApi.Installer // set SMAPI's color scheme if defined if (scheme != MonitorColorScheme.AutoDetect) { - string configPath = Path.Combine(paths.GamePath, "StardewModdingAPI.config.json"); string text = File - .ReadAllText(configPath) + .ReadAllText(paths.ApiConfigPath) .Replace(@"""ColorScheme"": ""AutoDetect""", $@"""ColorScheme"": ""{scheme}"""); - File.WriteAllText(configPath, text); + File.WriteAllText(paths.ApiConfigPath, text); } // remove obsolete appdata mods |