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 /src/SMAPI.Toolkit/Utilities/PathUtilities.cs | |
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)
Diffstat (limited to 'src/SMAPI.Toolkit/Utilities/PathUtilities.cs')
-rw-r--r-- | src/SMAPI.Toolkit/Utilities/PathUtilities.cs | 3 |
1 files changed, 3 insertions, 0 deletions
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); |