From 22bc7bf7c3e9efc0622a6993a9bba6fb914cc313 Mon Sep 17 00:00:00 2001 From: MaikyM <51415805+MaikyM@users.noreply.github.com> Date: Tue, 18 Jun 2019 20:04:59 -0600 Subject: [PATCH] Avoid extracting files in "Load and Extract difference" if the backup is not loaded. --- FModel/MainWindow.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index 2bfaa153..5bdeb555 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -37,6 +37,7 @@ namespace FModel private static List _itemsToDisplay { get; set; } public static string ExtractedFilePath { get; set; } public static string[] SelectedItemsArray { get; set; } + private bool differenceFileExists = false; #endregion public MainWindow() @@ -477,6 +478,7 @@ namespace FModel { PakAsTxt = File.ReadAllLines(App.DefaultOutputPath + "\\Result.txt"); File.Delete(App.DefaultOutputPath + "\\Result.txt"); + differenceFileExists = true; } } private void CreatePakList(ToolStripItemClickedEventArgs selectedPak = null, bool loadAllPaKs = false, bool getDiff = false, bool updateMode = false) @@ -549,7 +551,7 @@ namespace FModel { UpdateConsole("Comparing files...", Color.FromArgb(255, 244, 132, 66), "Loading"); ComparePaKs(); - if (updateMode) + if (updateMode && differenceFileExists) { UmFilter(PakAsTxt, _diffToExtract); Checking.UmWorking = true; @@ -564,6 +566,8 @@ namespace FModel } treeView1.EndUpdate(); })); + + differenceFileExists = false; UpdateConsole("Files compared", Color.FromArgb(255, 66, 244, 66), "Success"); } }