diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-09-02 18:54:56 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-09-02 18:54:56 -0400 |
commit | 8789b7efa816aab0f4ce9d3149c26b8033e0b0a5 (patch) | |
tree | 392f2f010ebcb7f795c8e1cc75286396f3fa8e44 /src/SMAPI/Framework/Content/AssetDataForMap.cs | |
parent | 5848a355bac789ba8d879df64bea400d17ea83f5 (diff) | |
download | SMAPI-8789b7efa816aab0f4ce9d3149c26b8033e0b0a5.tar.gz SMAPI-8789b7efa816aab0f4ce9d3149c26b8033e0b0a5.tar.bz2 SMAPI-8789b7efa816aab0f4ce9d3149c26b8033e0b0a5.zip |
prepare path utilities for the upcoming Stardew Valley 1.5.5
The game will use Linux-style paths for assets on all platforms, which will break the current equivalence between path and asset name formats.
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetDataForMap.cs')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForMap.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForMap.cs b/src/SMAPI/Framework/Content/AssetDataForMap.cs index 20f0ed0f..4f810948 100644 --- a/src/SMAPI/Framework/Content/AssetDataForMap.cs +++ b/src/SMAPI/Framework/Content/AssetDataForMap.cs @@ -153,9 +153,9 @@ namespace StardewModdingAPI.Framework.Content if (string.IsNullOrWhiteSpace(path)) return string.Empty; - path = PathUtilities.NormalizePath(path); - if (path.StartsWith($"Maps{PathUtilities.PreferredPathSeparator}", StringComparison.OrdinalIgnoreCase)) - path = path.Substring($"Maps{PathUtilities.PreferredPathSeparator}".Length); + path = PathUtilities.NormalizeAssetName(path); + if (path.StartsWith($"Maps{PathUtilities.PreferredAssetSeparator}", StringComparison.OrdinalIgnoreCase)) + path = path.Substring($"Maps{PathUtilities.PreferredAssetSeparator}".Length); if (path.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) path = path.Substring(0, path.Length - 4); |