diff --git a/FileManager.cs b/FileManager.cs index 9e02a8b..f794d72 100644 --- a/FileManager.cs +++ b/FileManager.cs @@ -594,7 +594,13 @@ private T GetExternalJson(string gamePath) public void CommitExternalJson(string externalJsonPath) { - fileArchive[externalJsonGamePath + "\\" + externalJsonPath].fileSource = FileSource.App; + string gamePath = externalJsonGamePath + "\\" + externalJsonPath; + if (!fileArchive.ContainsKey(gamePath)) + fileArchive[gamePath] = new() + { + gamePath = gamePath + }; + fileArchive[gamePath].fileSource = FileSource.App; } public ModArgs TryGetModArgs()