Skip to content

Commit

Permalink
System Restoring from Backup was Not Restoring Info file [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
LIPtoH committed Jul 8, 2022
1 parent ea0149b commit 7b65645
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions TS SE Tool/Forms/FormMainControlsMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7b65645

Please sign in to comment.