This commit is contained in:
cdle 2021-08-17 17:45:46 +08:00
parent 47b17b8ce0
commit 25841b181f
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ var handleMessage = func(msgs ...interface{}) interface{} {
if pins == "" {
return "找不到匹配的账号"
}
fmt.Println(pins)
for _, task := range Config.Tasks {
if task.Word == "查询" {
task.Envs = []Env{{

View File

@ -88,7 +88,7 @@ func runTask(task *Task, msgs ...interface{}) string {
io.Copy(f, r.Body)
f.Close()
} else {
if path != task.Path {
if path != task.Path && task.Name != 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)