Skip to content

Commit

Permalink
Allow string "Harmony" in DLL parent folder names
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jul 11, 2024
1 parent ab683b7 commit da70286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Netkan/Validators/HarmonyValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public void Validate(Metadata metadata)

var harmonyDLLs = _moduleService.GetPlugins(mod, zip, inst)
.Select(instF => instF.source.Name)
.Where(f => f.IndexOf("Harmony", StringComparison.InvariantCultureIgnoreCase) != -1)
.Where(f => f.IndexOf("Harmony", Math.Max(0, f.LastIndexOf('/')),
StringComparison.InvariantCultureIgnoreCase) != -1)
.OrderBy(f => f)
.ToList();
bool bundlesHarmony = harmonyDLLs.Any();
Expand Down

0 comments on commit da70286

Please sign in to comment.