diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-01-22 19:06:33 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-01-22 19:06:33 -0500 |
commit | 1670a2f3a6263da158db5231f60d42d529734209 (patch) | |
tree | fac03b7b364e53acf30eca61c476dda82ae1cc80 /src/SMAPI.Installer | |
parent | 25a22f5d7c527e60919b0e08a212578a323a8165 (diff) | |
download | SMAPI-1670a2f3a6263da158db5231f60d42d529734209.tar.gz SMAPI-1670a2f3a6263da158db5231f60d42d529734209.tar.bz2 SMAPI-1670a2f3a6263da158db5231f60d42d529734209.zip |
fix global data stored in saves folder
Diffstat (limited to 'src/SMAPI.Installer')
-rw-r--r-- | src/SMAPI.Installer/InteractiveInstaller.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs index 964300ac..14f37258 100644 --- a/src/SMAPI.Installer/InteractiveInstaller.cs +++ b/src/SMAPI.Installer/InteractiveInstaller.cs @@ -373,6 +373,21 @@ namespace StardewModdingApi.Installer this.InteractivelyDelete(path); } + // move global save data folder (changed in 3.2) + { + string dataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"); + DirectoryInfo oldDir = new DirectoryInfo(Path.Combine(dataPath, "Saves", ".smapi")); + DirectoryInfo newDir = new DirectoryInfo(Path.Combine(dataPath, ".smapi")); + + if (oldDir.Exists) + { + if (newDir.Exists) + this.InteractivelyDelete(oldDir.FullName); + else + oldDir.MoveTo(newDir.FullName); + } + } + /**** ** Install new files ****/ |