mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
更新迁移逻辑
Steam居然会自动云同步的时候创建个文件夹,太逊了
This commit is contained in:
parent
b3c34106a0
commit
8abef6bd07
@ -156,14 +156,21 @@ namespace VPet_Simulator.Windows
|
||||
Closed += ForceClose;
|
||||
|
||||
//更新存档系统
|
||||
if (Directory.Exists(ExtensionValue.BaseDirectory + @"\BackUP"))
|
||||
{
|
||||
if (!Directory.Exists(ExtensionValue.BaseDirectory + @"\Saves"))
|
||||
Directory.Move(ExtensionValue.BaseDirectory + @"\BackUP", ExtensionValue.BaseDirectory + @"\Saves");
|
||||
else
|
||||
{
|
||||
foreach (var file in new DirectoryInfo(ExtensionValue.BaseDirectory + @"\BackUP").GetFiles())
|
||||
if (!File.Exists(ExtensionValue.BaseDirectory + @"\Saves\" + file.Name))
|
||||
file.MoveTo(ExtensionValue.BaseDirectory + @"\Saves\" + file.Name);
|
||||
Directory.Delete(ExtensionValue.BaseDirectory + @"\BackUP");
|
||||
}
|
||||
}
|
||||
if (!Directory.Exists(ExtensionValue.BaseDirectory + @"\Saves"))
|
||||
{
|
||||
if (Directory.Exists(ExtensionValue.BaseDirectory + @"\BackUP"))
|
||||
{
|
||||
Directory.Move(ExtensionValue.BaseDirectory + @"\BackUP", ExtensionValue.BaseDirectory + @"\Saves");
|
||||
}
|
||||
else
|
||||
Directory.CreateDirectory(ExtensionValue.BaseDirectory + @"\Saves");
|
||||
Directory.CreateDirectory(ExtensionValue.BaseDirectory + @"\Saves");
|
||||
}
|
||||
|
||||
Task.Run(GameLoad);
|
||||
@ -484,7 +491,7 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamFriends.SetRichPresence("lv", "");
|
||||
SteamFriends.SetRichPresence("lv", " ");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user