diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-18 14:44:18 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-08-18 14:44:18 -0400 |
commit | f9eb16489fcf3f4c486df5f96a94edf16cf19a09 (patch) | |
tree | 8ee581968ae378682a91869e08e76ad32c064b61 /src/SMAPI/Framework | |
parent | c916cc5a1023ab81df89458ecb679405081f54c6 (diff) | |
download | SMAPI-f9eb16489fcf3f4c486df5f96a94edf16cf19a09.tar.gz SMAPI-f9eb16489fcf3f4c486df5f96a94edf16cf19a09.tar.bz2 SMAPI-f9eb16489fcf3f4c486df5f96a94edf16cf19a09.zip |
refactor some methods for reuse (#468)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index 9ac95fd4..09880d03 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text.RegularExpressions; using StardewModdingAPI.Toolkit; using StardewModdingAPI.Toolkit.Framework.ModData; using StardewModdingAPI.Toolkit.Framework.ModScanning; @@ -181,7 +180,7 @@ namespace StardewModdingAPI.Framework.ModLoading } // validate ID format - if (Regex.IsMatch(mod.Manifest.UniqueID, "[^a-z0-9_.-]", RegexOptions.IgnoreCase)) + if (!PathUtilities.IsSlug(mod.Manifest.UniqueID)) mod.SetStatus(ModMetadataStatus.Failed, "its manifest specifies an invalid ID (IDs must only contain letters, numbers, underscores, periods, or hyphens)."); } |