diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-08 00:05:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-08 00:05:58 -0500 |
commit | 35ba5cc58510a754b9377e33ebf01e3c2731d31e (patch) | |
tree | 7746d49e2f2ede99d59e46ea4755eb0b6c3bbd5c | |
parent | 00969f3b485fd0637980cb4dd8abead2fe621a3b (diff) | |
download | SMAPI-35ba5cc58510a754b9377e33ebf01e3c2731d31e.tar.gz SMAPI-35ba5cc58510a754b9377e33ebf01e3c2731d31e.tar.bz2 SMAPI-35ba5cc58510a754b9377e33ebf01e3c2731d31e.zip |
fix installer error when Mods folder doesn't exist in 3.9.3 (#764)
-rw-r--r-- | docs/release-notes.md | 4 | ||||
-rw-r--r-- | src/SMAPI.Toolkit/Utilities/PathUtilities.cs | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index ed03b3db..6112f99c 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,10 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> +## Upcoming release +* For players: + * Fixed installer error if the `Mods` folder doesn't exist in 3.9.3. + ## 3.9.3 Released 07 March 2021 for Stardew Valley 1.5.4 or later. diff --git a/src/SMAPI.Toolkit/Utilities/PathUtilities.cs b/src/SMAPI.Toolkit/Utilities/PathUtilities.cs index a394edba..babc0981 100644 --- a/src/SMAPI.Toolkit/Utilities/PathUtilities.cs +++ b/src/SMAPI.Toolkit/Utilities/PathUtilities.cs @@ -139,6 +139,9 @@ namespace StardewModdingAPI.Toolkit.Utilities /// <param name="rootPath">The root path to search.</param> internal static IEnumerable<string> GetTooLongPaths(string rootPath) { + if (!Directory.Exists(rootPath)) + return new string[0]; + return Directory .EnumerateFileSystemEntries(rootPath, "*.*", SearchOption.AllDirectories) .Where(PathUtilities.IsPathTooLong); |