From 81e484e8d0be6f9d3ca814b6b4838c29dbabd779 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 16 Jul 2024 15:15:42 -0400 Subject: [PATCH] Add back dupe checking as well --- SabreTools.DatTools/Rebuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SabreTools.DatTools/Rebuilder.cs b/SabreTools.DatTools/Rebuilder.cs index b9c9c67c..c34814d7 100644 --- a/SabreTools.DatTools/Rebuilder.cs +++ b/SabreTools.DatTools/Rebuilder.cs @@ -425,9 +425,9 @@ namespace SabreTools.DatTools if (RebuildTorrentXz(datFile, datItem, file, outDir, outputFormat, isZip)) return true; - // Create a temp file if we're compressing the data after + // Create a temp file if we're compressing the data after or if there are multiple dupes string? tempFile = null; - if (outputFormat != OutputFormat.Folder) + if (outputFormat != OutputFormat.Folder || dupes.Count > 1) { tempFile = Path.Combine(outDir, $"tmp{System.Guid.NewGuid()}"); Stream tempStream = System.IO.File.Open(tempFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);