diff --git a/src/Core/ModManager.cs b/src/Core/ModManager.cs index 651f115..1cfc460 100644 --- a/src/Core/ModManager.cs +++ b/src/Core/ModManager.cs @@ -276,6 +276,7 @@ private void InstallAllModFiles(CancellationToken cancellationToken) var modConfigs = new List(); var installedFilesByMod = new Dictionary(); var installedFiles = new HashSet(); + bool SkipAlreadyInstalled(string file) => installedFiles.Add(file.ToLowerInvariant()); try { if (modPackages.Any()) @@ -296,7 +297,7 @@ private void InstallAllModFiles(CancellationToken cancellationToken) var mod = ExtractMod(packageName, modReference.FullPath); try { - mod.Install(game.InstallationDirectory, installedFiles.Add); + mod.Install(game.InstallationDirectory, SkipAlreadyInstalled); modConfigs.Add(mod.Config); } finally @@ -315,7 +316,7 @@ private void InstallAllModFiles(CancellationToken cancellationToken) var postProcessingDone = false; try { - bootfilesMod.Install(game.InstallationDirectory, installedFiles.Add); + bootfilesMod.Install(game.InstallationDirectory, SkipAlreadyInstalled); Logs?.Invoke("Post-processing:"); Logs?.Invoke("- Appending crd file entries"); PostProcessor.AppendCrdFileEntries(game.InstallationDirectory, modConfigs.SelectMany(_ => _.CrdFileEntries));