summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-03-08 00:08:28 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-03-08 00:08:28 -0500
commitfc5fc54ab1c375e20b3e4f947bb11f08b4983bd1 (patch)
tree39d53bcec33d7454829f6c4f24df5a43d9bf4ec4 /src/SMAPI.Toolkit
parent5399239c2be01396958ed454d6ae56f006d20ca5 (diff)
parentb8309e90173172dd88a50b429b760271b4a150cf (diff)
downloadSMAPI-fc5fc54ab1c375e20b3e4f947bb11f08b4983bd1.tar.gz
SMAPI-fc5fc54ab1c375e20b3e4f947bb11f08b4983bd1.tar.bz2
SMAPI-fc5fc54ab1c375e20b3e4f947bb11f08b4983bd1.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit')
-rw-r--r--src/SMAPI.Toolkit/Utilities/PathUtilities.cs3
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);