summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Constants.cs2
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForMap.cs2
-rw-r--r--src/SMAPI/Framework/Content/ContentCache.cs2
-rw-r--r--src/SMAPI/Framework/ContentPack.cs4
-rw-r--r--src/SMAPI/Framework/ModHelpers/DataHelper.cs4
-rw-r--r--src/SMAPI/Utilities/PathUtilities.cs6
6 files changed, 10 insertions, 10 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 7540061d..6017a1d4 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -51,7 +51,7 @@ namespace StardewModdingAPI
** Public
****/
/// <summary>SMAPI's current semantic version.</summary>
- public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.1");
+ public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.2");
/// <summary>The minimum supported version of Stardew Valley.</summary>
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1");
diff --git a/src/SMAPI/Framework/Content/AssetDataForMap.cs b/src/SMAPI/Framework/Content/AssetDataForMap.cs
index e80c6e53..20f0ed0f 100644
--- a/src/SMAPI/Framework/Content/AssetDataForMap.cs
+++ b/src/SMAPI/Framework/Content/AssetDataForMap.cs
@@ -153,7 +153,7 @@ namespace StardewModdingAPI.Framework.Content
if (string.IsNullOrWhiteSpace(path))
return string.Empty;
- path = PathUtilities.NormalizePathSeparators(path.Trim());
+ path = PathUtilities.NormalizePath(path);
if (path.StartsWith($"Maps{PathUtilities.PreferredPathSeparator}", StringComparison.OrdinalIgnoreCase))
path = path.Substring($"Maps{PathUtilities.PreferredPathSeparator}".Length);
if (path.EndsWith(".png", StringComparison.OrdinalIgnoreCase))
diff --git a/src/SMAPI/Framework/Content/ContentCache.cs b/src/SMAPI/Framework/Content/ContentCache.cs
index 2052f6bf..af65e07e 100644
--- a/src/SMAPI/Framework/Content/ContentCache.cs
+++ b/src/SMAPI/Framework/Content/ContentCache.cs
@@ -80,7 +80,7 @@ namespace StardewModdingAPI.Framework.Content
[Pure]
public string NormalizePathSeparators(string path)
{
- return PathUtilities.NormalizePathSeparators(path);
+ return PathUtilities.NormalizePath(path);
}
/// <summary>Normalize a cache key so it's consistent with the underlying cache.</summary>
diff --git a/src/SMAPI/Framework/ContentPack.cs b/src/SMAPI/Framework/ContentPack.cs
index 55c1a0b2..65abba5b 100644
--- a/src/SMAPI/Framework/ContentPack.cs
+++ b/src/SMAPI/Framework/ContentPack.cs
@@ -62,7 +62,7 @@ namespace StardewModdingAPI.Framework
{
this.AssertRelativePath(path, nameof(this.ReadJsonFile));
- path = Path.Combine(this.DirectoryPath, PathUtilities.NormalizePathSeparators(path));
+ path = Path.Combine(this.DirectoryPath, PathUtilities.NormalizePath(path));
return this.JsonHelper.ReadJsonFileIfExists(path, out TModel model)
? model
: null;
@@ -73,7 +73,7 @@ namespace StardewModdingAPI.Framework
{
this.AssertRelativePath(path, nameof(this.WriteJsonFile));
- path = Path.Combine(this.DirectoryPath, PathUtilities.NormalizePathSeparators(path));
+ path = Path.Combine(this.DirectoryPath, PathUtilities.NormalizePath(path));
this.JsonHelper.WriteJsonFile(path, data);
}
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);
}
diff --git a/src/SMAPI/Utilities/PathUtilities.cs b/src/SMAPI/Utilities/PathUtilities.cs
index ea134468..19f16ea9 100644
--- a/src/SMAPI/Utilities/PathUtilities.cs
+++ b/src/SMAPI/Utilities/PathUtilities.cs
@@ -18,12 +18,12 @@ namespace StardewModdingAPI.Utilities
return ToolkitPathUtilities.GetSegments(path, limit);
}
- /// <summary>Normalize path separators in a file path.</summary>
+ /// <summary>Normalize separators in a file path.</summary>
/// <param name="path">The file path to normalize.</param>
[Pure]
- public static string NormalizePathSeparators(string path)
+ public static string NormalizePath(string path)
{
- return ToolkitPathUtilities.NormalizePathSeparators(path);
+ return ToolkitPathUtilities.NormalizePath(path);
}
/// <summary>Get whether a path is relative and doesn't try to climb out of its containing folder (e.g. doesn't contain <c>../</c>).</summary>