From 2bccdd97370b958187b0ad99437e4ca85ec5ae1f Mon Sep 17 00:00:00 2001 From: atravita-mods <94934860+atravita-mods@users.noreply.github.com> Date: Fri, 11 Nov 2022 06:52:46 -0500 Subject: [PATCH] edit comment. --- src/SMAPI/Framework/Content/AssetName.cs | 2 ++ 1 file changed, 2 insertions(+) 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); }