fix: make WebDAV upload retry reliable

This commit is contained in:
OpenClaw Agent
2026-09-17 06:41:35 +08:00
parent efb2ff33b4
commit 40d99e1e22
5 changed files with 59 additions and 7 deletions
+10
View File
@@ -25,6 +25,16 @@ func (a *App) fail(t *Task, err error) {
}
}
func (a *App) failUpload(t *Task, err error) {
if err == nil {
err = errors.New("unknown WebDAV upload error")
}
t.RemotePath = ""
t.Status = "upload_pending"
t.Error = "WebDAV 上传失败,等待自动重试: " + err.Error()
a.db.Save(t)
}
var bad = regexp.MustCompile(`[/\\:*?"<>|]+`)
func safe(s string) string {