From 35ba5cc58510a754b9377e33ebf01e3c2731d31e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 8 Mar 2021 00:05:58 -0500 Subject: fix installer error when Mods folder doesn't exist in 3.9.3 (#764) --- src/SMAPI.Toolkit/Utilities/PathUtilities.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/SMAPI.Toolkit') 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 /// The root path to search. internal static IEnumerable GetTooLongPaths(string rootPath) { + if (!Directory.Exists(rootPath)) + return new string[0]; + return Directory .EnumerateFileSystemEntries(rootPath, "*.*", SearchOption.AllDirectories) .Where(PathUtilities.IsPathTooLong); -- cgit