summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/ModResolver.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-02-19 20:29:52 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-02-19 20:29:52 -0500
commit9369232118d0ae08df49bbc30037387cf71dd861 (patch)
treee69dbe995cd60780f83eb7fd3ab3fa59c6e5ca10 /src/SMAPI/Framework/ModLoading/ModResolver.cs
parentb6cc17112d95345de83348dd918ed1f7711926f4 (diff)
downloadSMAPI-9369232118d0ae08df49bbc30037387cf71dd861.tar.gz
SMAPI-9369232118d0ae08df49bbc30037387cf71dd861.tar.bz2
SMAPI-9369232118d0ae08df49bbc30037387cf71dd861.zip
replace manual relative path logic with new path utilities
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/ModResolver.cs')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModResolver.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs
index 8b4a3eb8..ba6dab1a 100644
--- a/src/SMAPI/Framework/ModLoading/ModResolver.cs
+++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs
@@ -6,6 +6,7 @@ using StardewModdingAPI.Framework.Exceptions;
using StardewModdingAPI.Framework.ModData;
using StardewModdingAPI.Framework.Models;
using StardewModdingAPI.Framework.Serialisation;
+using StardewModdingAPI.Framework.Utilities;
namespace StardewModdingAPI.Framework.ModLoading
{
@@ -55,7 +56,7 @@ namespace StardewModdingAPI.Framework.ModLoading
if (string.IsNullOrWhiteSpace(displayName))
displayName = dataRecord?.DisplayName;
if (string.IsNullOrWhiteSpace(displayName))
- displayName = modDir.FullName.Replace(rootPath, "").Trim('/', '\\');
+ displayName = PathUtilities.GetRelativePath(rootPath, modDir.FullName);
// apply defaults
if (manifest != null && dataRecord != null)