summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-09-08 18:12:57 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-09-08 18:12:57 -0400
commit7580f87029ac9f778ec632c7ccaed489d7ca1364 (patch)
tree5d18f8a0590adc047ffe62fae2584b7fd632bcee /src/SMAPI/Framework/ModHelpers
parent8a51279ce943ff74b45ec7af308ecf59d73ace9b (diff)
downloadSMAPI-7580f87029ac9f778ec632c7ccaed489d7ca1364.tar.gz
SMAPI-7580f87029ac9f778ec632c7ccaed489d7ca1364.tar.bz2
SMAPI-7580f87029ac9f778ec632c7ccaed489d7ca1364.zip
rename PathUtilities.NormalizePathSeparator, add normalization for more cases
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r--src/SMAPI/Framework/ModHelpers/DataHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/DataHelper.cs b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
index c232a6dd..41612387 100644
--- a/src/SMAPI/Framework/ModHelpers/DataHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
@@ -45,7 +45,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
if (!PathUtilities.IsSafeRelativePath(path))
throw new InvalidOperationException($"You must call {nameof(IModHelper.Data)}.{nameof(this.ReadJsonFile)} with a relative path.");
- path = Path.Combine(this.ModFolderPath, PathUtilities.NormalizePathSeparators(path));
+ path = Path.Combine(this.ModFolderPath, PathUtilities.NormalizePath(path));
return this.JsonHelper.ReadJsonFileIfExists(path, out TModel data)
? data
: null;
@@ -57,7 +57,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
if (!PathUtilities.IsSafeRelativePath(path))
throw new InvalidOperationException($"You must call {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.WriteJsonFile)} with a relative path (without directory climbing).");
- path = Path.Combine(this.ModFolderPath, PathUtilities.NormalizePathSeparators(path));
+ path = Path.Combine(this.ModFolderPath, PathUtilities.NormalizePath(path));
this.JsonHelper.WriteJsonFile(path, data);
}