From cfbb81ccc6472d635a51435a0ab25adbd22ca443 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Tue, 17 Aug 2021 15:14:14 +0800 Subject: [PATCH] x --- models/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/task.go b/models/task.go index 85ac0e6..5113852 100644 --- a/models/task.go +++ b/models/task.go @@ -88,7 +88,7 @@ func runTask(task *Task, msgs ...interface{}) string { io.Copy(f, r.Body) f.Close() } else { - if task.Name != task.Path { + if path != task.Path { f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0777) if err != nil { logs.Warn("打开%s失败,", path, err)