diff --git a/src/IronyModManager.Services/ModMergeService.cs b/src/IronyModManager.Services/ModMergeService.cs index cea99535..0e6d98fd 100644 --- a/src/IronyModManager.Services/ModMergeService.cs +++ b/src/IronyModManager.Services/ModMergeService.cs @@ -435,6 +435,9 @@ async void ModMergeCompressExporterProcessedFile(object sender, EventArgs e) } lastPercentage = percentage; + + // ReSharper disable once DisposeOnUsingVariable - sod off + mutex.Dispose(); } modMergeCompressExporter.ProcessedFile += ModMergeCompressExporterProcessedFile; @@ -485,6 +488,9 @@ async void ModMergeCompressExporterProcessedFile(object sender, EventArgs e) } lastPercentage = innerPercentage; + + // ReSharper disable once DisposeOnUsingVariable - sod off + innerProgressLock.Dispose(); } string path; @@ -525,6 +531,9 @@ async void ModMergeCompressExporterProcessedFile(object sender, EventArgs e) lastPercentage = outerPercentage; + // ReSharper disable once DisposeOnUsingVariable - sod off + outerProgressLock.Dispose(); + modMergeCompressExporter.Finalize(queueId, Path.Combine(modDirRootPath, mergeCollectionPath, path)); renamePairs.Add(new KeyValuePair(collectionMod.Name, newMod.Name)); @@ -537,6 +546,9 @@ async void ModMergeCompressExporterProcessedFile(object sender, EventArgs e) await p.DisposeAsync(); }); await Task.WhenAll(streamTasks); + + // ReSharper disable once DisposeOnUsingVariable - sod off + exportModLock.Dispose(); } finally {