Skip to content

Commit

Permalink
Allow patches
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks committed Sep 15, 2024
1 parent 405c060 commit eb41342
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions loginspect/LogInspect/LogInspect/Inspectors/HJT/HjtInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ public HjtInspector()
throw new Exception("Failed to deserialize HJT flags");
}

if (!File.Exists($"{Program.DataPath}/HjtPatches.json"))
{
File.WriteAllText($"{Program.DataPath}/HjtPatches.json", "[]");
}

var patchesJson = File.ReadAllText($"{Program.DataPath}/HjtPatches.json");
var patches = JsonSerializer.Deserialize<List<HjtFlag>>(patchesJson);

if (patches == null)
{
throw new Exception("Failed to deserialize HJT patches");
}

flags.AddRange(patches);
_flags.AddRange(flags);
}

Expand Down

0 comments on commit eb41342

Please sign in to comment.