fix(agent): 修复 nginx 版本目录被误加载并发布 v1.4.4
CI / verify (push) Canceled after 0s

This commit is contained in:
2026-09-28 14:37:15 +08:00
parent 8c07e64e87
commit c92d06642f
15 changed files with 177 additions and 23 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ func (m *Manager) Apply(ctx context.Context, rules []proxy.Rule, certs []CertSou
}
currentPath := m.cfg.NginxConfigPath()
// 覆盖前留退路:.bak 保留最近一次(兼容既有读取方),.versions/ 保留最近 10 份(供版本对比与回滚)
// 覆盖前留退路:.bak 保留最近一次(兼容既有读取方),隐藏的 .versions 目录保留最近 10 份(供版本对比与回滚)
if err := fsutil.Backup(currentPath); err != nil {
_ = os.Remove(tmpPath)
return ApplyResult{}, err