summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Utilities/PathUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Toolkit/Utilities/PathUtilities.cs')
-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);