summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-05-14 16:10:59 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-05-14 16:10:59 -0400
commit9e1bfff7f7889783fcaa7d055e3351b90d03f465 (patch)
tree305ea3b66d43db56fe7441aa771c46a5ef8914ad
parentbb5c4001d6c46e30584b503638f0df957d0673e9 (diff)
downloadSMAPI-9e1bfff7f7889783fcaa7d055e3351b90d03f465.tar.gz
SMAPI-9e1bfff7f7889783fcaa7d055e3351b90d03f465.tar.bz2
SMAPI-9e1bfff7f7889783fcaa7d055e3351b90d03f465.zip
fix install error if a game folder has an invalid symlink
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index cd9ef7b9..298a0f8e 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -12,6 +12,7 @@
* Added support for overriding SMAPI configuration per `Mods` folder (thanks to Shockah!).
* In multiplayer, the game/SMAPI window titles now show whether you're the main player or a farmhand.
* Fixed logged SMAPI errors not having line numbers on Linux/macOS.
+ * Fixed install error if a game folder has an invalid symlink.
* For mod authors:
* Added support for [custom update manifests](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Update_checks#Custom_update_manifest) (thanks to Jamie Taylor!).
diff --git a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
index 88142805..45f3e203 100644
--- a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
+++ b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
@@ -73,7 +73,7 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning
return GameFolderType.NoGameFound;
// apparently valid
- if (dir.EnumerateFiles("Stardew Valley.dll").Any())
+ if (File.Exists(Path.Combine(dir.FullName, "Stardew Valley.dll")))
return GameFolderType.Valid;
// doesn't contain any version of Stardew Valley