From 7580f87029ac9f778ec632c7ccaed489d7ca1364 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 8 Sep 2020 18:12:57 -0400 Subject: rename PathUtilities.NormalizePathSeparator, add normalization for more cases --- src/SMAPI/Framework/Content/AssetDataForMap.cs | 2 +- src/SMAPI/Framework/Content/ContentCache.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/SMAPI/Framework/Content') 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); } /// Normalize a cache key so it's consistent with the underlying cache. -- cgit