From 294647a6a9f3c4438cda9c9407ad9666b12fb917 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 27 Sep 2023 12:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSteam=E4=BA=91=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=AF=BC=E8=87=B4=E7=9A=84=E5=82=A8=E5=AD=98=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 4f92d94..0607eb6 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -207,10 +207,14 @@ namespace VPet_Simulator.Windows if (File.Exists(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps")) File.Delete(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps"); + File.WriteAllText(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps", GameSavesData.ToLPS().ToString()); + + if (File.Exists(ExtensionValue.BaseDirectory + @"\Save.bkp")) + File.Delete(ExtensionValue.BaseDirectory + @"\Save.bkp"); + if (File.Exists(ExtensionValue.BaseDirectory + @"\Save.lps")) File.Move(ExtensionValue.BaseDirectory + @"\Save.lps", ExtensionValue.BaseDirectory + @"\Save.bkp"); - File.WriteAllText(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps", GameSavesData.ToLPS().ToString()); } } }