edit comment.

This commit is contained in:
atravita-mods 2022-11-11 06:52:46 -05:00
parent 4ca546a7a8
commit 2bccdd9737
1 changed files with 2 additions and 0 deletions

View File

@ -163,6 +163,8 @@ namespace StardewModdingAPI.Framework.Content
return false; return false;
// match if subfolder paths are fine (e.g. prefix 'Data/Events' with target 'Data/Events/Beach') // 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); return allowSubfolder || (pathSeparators.Contains(trimmedPrefix[^1]) && curParts.Remainder.Length == 0);
} }