From 4690f8e2a307bf9d081c161480c893276c4cabec Mon Sep 17 00:00:00 2001 From: elpatron68 Date: Sun, 16 Oct 2022 11:13:19 +0200 Subject: [PATCH 1/4] Fix problem moving old backups to new directory --- SnowRunner-Tool/EpicParser.cs | 4 ++++ SnowRunner-Tool/MainWindow.xaml | 4 ++-- SnowRunner-Tool/MainWindow.xaml.cs | 2 +- SnowRunner-Tool/UpdateCheck.cs | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SnowRunner-Tool/EpicParser.cs b/SnowRunner-Tool/EpicParser.cs index 2813e8e..78562c7 100644 --- a/SnowRunner-Tool/EpicParser.cs +++ b/SnowRunner-Tool/EpicParser.cs @@ -41,6 +41,10 @@ public static void MoveOldBackupsToNewLocation(string SRProfileDirectory, string { try { + if (!Directory.Exists(MyBackupDir)) + { + Directory.CreateDirectory(MyBackupDir); + } File.Move(backupFile, MyBackupDir + @"\" + Path.GetFileName(backupFile)); } catch diff --git a/SnowRunner-Tool/MainWindow.xaml b/SnowRunner-Tool/MainWindow.xaml index 3ad828a..15351c2 100644 --- a/SnowRunner-Tool/MainWindow.xaml +++ b/SnowRunner-Tool/MainWindow.xaml @@ -26,7 +26,7 @@ @@ -364,7 +364,7 @@ Margin="0,0,30,20" Width="215" RenderTransformOrigin="-0.29,0.04" - Click="Button_Click" + Click="BtnBackupCurrentSave_Click" />