mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复保存时备份设置导致的错误
This commit is contained in:
parent
47b1be214f
commit
4b385415e7
@ -235,8 +235,10 @@ namespace VPet_Simulator.Windows
|
||||
//timecount = DateTime.Now;
|
||||
}
|
||||
Set.StartRecordLastPoint = new Point(Dispatcher.Invoke(() => Left), Dispatcher.Invoke(() => Top));
|
||||
if (PrefixSave == "")
|
||||
if (PrefixSave == "" && File.Exists(ExtensionValue.BaseDirectory + @"\Setting.lps"))
|
||||
{//对于主设置的备份
|
||||
if (File.Exists(ExtensionValue.BaseDirectory + @"\Setting.bkp"))
|
||||
File.Delete(ExtensionValue.BaseDirectory + @"\Setting.bkp");
|
||||
File.Move(ExtensionValue.BaseDirectory + @"\Setting.lps", ExtensionValue.BaseDirectory + @"\Setting.bkp");
|
||||
}
|
||||
File.WriteAllText(ExtensionValue.BaseDirectory + @$"\Setting{PrefixSave}.lps", Set.ToString());
|
||||
|
Loading…
Reference in New Issue
Block a user