From 7b656452f1c0dbcc3897096fc8b63129d49d7d63 Mon Sep 17 00:00:00 2001 From: LIPtoH Date: Fri, 8 Jul 2022 16:09:00 +0500 Subject: [PATCH] System Restoring from Backup was Not Restoring Info file [fix] --- TS SE Tool/Forms/FormMainControlsMethods.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/TS SE Tool/Forms/FormMainControlsMethods.cs b/TS SE Tool/Forms/FormMainControlsMethods.cs index ca18a04..c92c51b 100644 --- a/TS SE Tool/Forms/FormMainControlsMethods.cs +++ b/TS SE Tool/Forms/FormMainControlsMethods.cs @@ -335,21 +335,26 @@ private void buttonProfilesAndSavesRestoreBackup_Click(object sender, EventArgs if (dr == DialogResult.Cancel) return; + string SiiInfoPath = Globals.SelectedSavePath + @"\info.sii", + SiiInfoPathBackup = Globals.SelectedSavePath + @"\info_backup.sii"; + if (dr == DialogResult.No) { SwapFiles(SiiSavePath, SiiSavePathBackup); - string SiiInfoPath = Globals.SelectedSavePath + @"\info.sii", - SiiInfoPathBackup = Globals.SelectedSavePath + @"\info_backup.sii"; - if (File.Exists(SiiInfoPathBackup)) SwapFiles(SiiInfoPath, SiiInfoPathBackup); } else { File.Copy(SiiSavePathBackup, SiiSavePath, true); - File.Delete(SiiSavePathBackup); + + if (File.Exists(SiiInfoPathBackup)) + { + File.Copy(SiiInfoPathBackup, SiiInfoPath, true); + File.Delete(SiiInfoPathBackup); + } } void SwapFiles(string _firstFile, string _secondFile)