mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
fix: 简单处理下连续更新后.old文件删除报错的问题
This commit is contained in:
@@ -274,7 +274,14 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
|
||||
foreach (var oldFile in Directory.GetFiles(curDir, "*.old"))
|
||||
{
|
||||
File.Delete(oldFile);
|
||||
try
|
||||
{
|
||||
File.Delete(oldFile);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
File.Move(oldFile, oldFile + ".old");
|
||||
}
|
||||
}
|
||||
|
||||
// 操作完了,把解压的文件删了
|
||||
|
||||
Reference in New Issue
Block a user