更新后删除配置
This commit is contained in:
parent
a373ac8a2f
commit
b95678b745
|
|
@ -139,14 +139,19 @@ func checkAndUpdate() {
|
|||
return
|
||||
}
|
||||
|
||||
// 删除info文件,下次再试
|
||||
err = handler.RemoveUpdateInfo(exePath)
|
||||
if err != nil {
|
||||
logger.Error("Error removing update info: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
exeDir := filepath.Dir(exePath)
|
||||
// 先更新so文件
|
||||
logger.Debug("Updating so file...")
|
||||
err = handler.ExecuteUpdate(exeDir, info.SoFileNewPath, info.SoFileOldPath, info.SoTargetPath, false)
|
||||
if err != nil {
|
||||
logger.Error("Error updating so file: %v", err)
|
||||
// 删除info文件,下次再试
|
||||
handler.RemoveUpdateInfo(exePath)
|
||||
return
|
||||
}
|
||||
// 更新exe程序
|
||||
|
|
@ -155,8 +160,6 @@ func checkAndUpdate() {
|
|||
err = handler.ExecuteUpdate(exeDir, info.ExeFileNewPath, info.ExeFileOldPath, info.ExeTargetPath, true)
|
||||
if err != nil {
|
||||
logger.Error("Error updating exe file: %v", err)
|
||||
// 删除info文件,下次再试
|
||||
handler.RemoveUpdateInfo(exePath)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue