From e85f6b54ddfae1b1842c86356c9891e182aaecc7 Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Sun, 12 Apr 2020 13:55:59 -0500 Subject: [PATCH] Clearing jobs create new lists instead of clearing Other users may have grabbed them and then have the content swiped out from under them --- Wabbajack.Lib/ACompiler.cs | 6 +++--- Wabbajack.Lib/MO2Compiler.cs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Wabbajack.Lib/ACompiler.cs b/Wabbajack.Lib/ACompiler.cs index 06654835..45f2d445 100644 --- a/Wabbajack.Lib/ACompiler.cs +++ b/Wabbajack.Lib/ACompiler.cs @@ -42,9 +42,9 @@ namespace Wabbajack.Lib public bool IgnoreMissingFiles { get; set; } - public readonly List SelectedArchives = new List(); - public readonly List InstallDirectives = new List(); - public readonly List AllFiles = new List(); + public List SelectedArchives { get; protected set; } = new List(); + public List InstallDirectives { get; protected set; } = new List(); + public List AllFiles { get; protected set; } = new List(); public ModList ModList = new ModList(); public List IndexedArchives = new List(); diff --git a/Wabbajack.Lib/MO2Compiler.cs b/Wabbajack.Lib/MO2Compiler.cs index e79ea68a..69b1546b 100644 --- a/Wabbajack.Lib/MO2Compiler.cs +++ b/Wabbajack.Lib/MO2Compiler.cs @@ -53,7 +53,7 @@ namespace Wabbajack.Lib public AbsolutePath MO2ProfileDir => MO2Folder.Combine("profiles", MO2Profile); - public ConcurrentBag ExtraFiles { get; } = new ConcurrentBag(); + public ConcurrentBag ExtraFiles { get; private set; } = new ConcurrentBag(); public Dictionary ModInis { get; } = new Dictionary(); public HashSet SelectedProfiles { get; set; } = new HashSet(); @@ -409,10 +409,10 @@ namespace Wabbajack.Lib /// private void ResetMembers() { - AllFiles.Clear(); - InstallDirectives.Clear(); - SelectedArchives.Clear(); - ExtraFiles.Clear(); + AllFiles = new List(); + InstallDirectives = new List(); + SelectedArchives = new List(); + ExtraFiles = new ConcurrentBag(); } ///