Fix: cannot transfer tasks with multiple files in slave node

This commit is contained in:
HFO4
2021-11-26 10:58:01 +08:00
parent 3948ee7f3a
commit 4eb7525c51
2 changed files with 3 additions and 4 deletions

View File

@@ -11,7 +11,6 @@ import (
"github.com/cloudreve/Cloudreve/v3/pkg/task"
"github.com/cloudreve/Cloudreve/v3/pkg/util"
"os"
"path/filepath"
)
// TransferTask 文件中转任务
@@ -138,8 +137,8 @@ func (job *TransferTask) Do() {
// Recycle 回收临时文件
func (job *TransferTask) Recycle() {
err := os.RemoveAll(filepath.Dir(job.Req.Src))
err := os.Remove(job.Req.Src)
if err != nil {
util.Log().Warning("无法删除中转临时目录[%s], %s", job.Req.Src, err)
util.Log().Warning("无法删除中转临时文件[%s], %s", job.Req.Src, err)
}
}