diff options
author | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-11-11 06:38:35 -0500 |
---|---|---|
committer | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-11-11 06:38:35 -0500 |
commit | 4ca546a7a8d5e0f6c9e0df7370f4e6c858d5b69b (patch) | |
tree | 9339b96dc5aa445201698f93fc2061ad0c040269 /src/SMAPI/Framework/Content | |
parent | 303b3924ae3ef905d77b9d7ef0f9efc70e58c2b8 (diff) | |
download | SMAPI-4ca546a7a8d5e0f6c9e0df7370f4e6c858d5b69b.tar.gz SMAPI-4ca546a7a8d5e0f6c9e0df7370f4e6c858d5b69b.tar.bz2 SMAPI-4ca546a7a8d5e0f6c9e0df7370f4e6c858d5b69b.zip |
directly add tests over the trailing slash.
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetName.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/AssetName.cs b/src/SMAPI/Framework/Content/AssetName.cs index 99968299..83593de8 100644 --- a/src/SMAPI/Framework/Content/AssetName.cs +++ b/src/SMAPI/Framework/Content/AssetName.cs @@ -163,7 +163,7 @@ namespace StardewModdingAPI.Framework.Content return false; // match if subfolder paths are fine (e.g. prefix 'Data/Events' with target 'Data/Events/Beach') - return allowSubfolder; + return allowSubfolder || (pathSeparators.Contains(trimmedPrefix[^1]) && curParts.Remainder.Length == 0); } // previous segments matched exactly and both reached the end |