summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-27 20:09:43 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-27 20:09:43 -0400
commitd7d8cdaa5a4bc01001e3538a9189b04d1130d3bb (patch)
tree5fb993cd855ae1e6f26e61d78543fef168da7ddf /src/SMAPI/Framework/Content
parent8425c8203394c436645828fcd11976078d04a1f7 (diff)
downloadSMAPI-d7d8cdaa5a4bc01001e3538a9189b04d1130d3bb.tar.gz
SMAPI-d7d8cdaa5a4bc01001e3538a9189b04d1130d3bb.tar.bz2
SMAPI-d7d8cdaa5a4bc01001e3538a9189b04d1130d3bb.zip
add backwards compatibility for loading content assets with .xnb extension
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r--src/SMAPI/Framework/Content/ContentCache.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/ContentCache.cs b/src/SMAPI/Framework/Content/ContentCache.cs
index cbb6c1e9..736ee5da 100644
--- a/src/SMAPI/Framework/Content/ContentCache.cs
+++ b/src/SMAPI/Framework/Content/ContentCache.cs
@@ -76,7 +76,7 @@ namespace StardewModdingAPI.Framework.Content
{
key = this.NormalizePathSeparators(key);
return key.EndsWith(".xnb", StringComparison.OrdinalIgnoreCase)
- ? key.Substring(0, key.Length - 4)
+ ? key[..^4]
: key;
}