fix: make WebDAV upload retry reliable
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user