diff --git a/loginspect/LogInspect/LogInspect/Inspectors/HJT/HjtInspector.cs b/loginspect/LogInspect/LogInspect/Inspectors/HJT/HjtInspector.cs index 7cf0a9a..3dda664 100644 --- a/loginspect/LogInspect/LogInspect/Inspectors/HJT/HjtInspector.cs +++ b/loginspect/LogInspect/LogInspect/Inspectors/HJT/HjtInspector.cs @@ -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>(patchesJson); + + if (patches == null) + { + throw new Exception("Failed to deserialize HJT patches"); + } + + flags.AddRange(patches); _flags.AddRange(flags); }