summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoratravita-mods <94934860+atravita-mods@users.noreply.github.com>2022-11-11 06:52:46 -0500
committeratravita-mods <94934860+atravita-mods@users.noreply.github.com>2022-11-11 06:52:46 -0500
commit2bccdd97370b958187b0ad99437e4ca85ec5ae1f (patch)
treefc24a47e8ec369ca41962c97a309778a3447c7aa
parent4ca546a7a8d5e0f6c9e0df7370f4e6c858d5b69b (diff)
downloadSMAPI-2bccdd97370b958187b0ad99437e4ca85ec5ae1f.tar.gz
SMAPI-2bccdd97370b958187b0ad99437e4ca85ec5ae1f.tar.bz2
SMAPI-2bccdd97370b958187b0ad99437e4ca85ec5ae1f.zip
edit comment.
-rw-r--r--src/SMAPI/Framework/Content/AssetName.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/Content/AssetName.cs b/src/SMAPI/Framework/Content/AssetName.cs
index 83593de8..a1c6a5da 100644
--- a/src/SMAPI/Framework/Content/AssetName.cs
+++ b/src/SMAPI/Framework/Content/AssetName.cs
@@ -163,6 +163,8 @@ namespace StardewModdingAPI.Framework.Content
return false;
// match if subfolder paths are fine (e.g. prefix 'Data/Events' with target 'Data/Events/Beach')
+ // special case if the original prefix ended with a '/' - subfolder checking pushes forward one, to check the Remainder instead of Current
+ // which is necessarily nonzero in this block.
return allowSubfolder || (pathSeparators.Contains(trimmedPrefix[^1]) && curParts.Remainder.Length == 0);
}