Skip to content

Commit

Permalink
fix: prevent mock match of assets starting with an underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Jan 2, 2024
1 parent b76e5a9 commit 666c8a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions JotunnLib/Managers/MockSystem/MockManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ private static bool IsMockName(string name, out string assetName, out List<strin
{
if (name.StartsWith(JVLMockPrefix, StringComparison.Ordinal))
{
var splitNames = name.Split(new[] { JVLMockSeparator }, StringSplitOptions.RemoveEmptyEntries);
assetName = splitNames[0].Substring(JVLMockPrefix.Length);
var mockTarget = name.Substring(JVLMockPrefix.Length);
var splitNames = mockTarget.Split(new[] { JVLMockSeparator }, StringSplitOptions.RemoveEmptyEntries);
assetName = splitNames[0];
childNames = splitNames.Skip(1).ToList();
return true;
}
Expand Down

0 comments on commit 666c8a8

Please sign in to comment.