Test: pkg/task

This commit is contained in:
HFO4
2020-02-06 16:01:06 +08:00
parent 2b853dddd3
commit fc5b7d42c8
11 changed files with 707 additions and 7 deletions

View File

@@ -88,7 +88,8 @@ func (job *TransferTask) Do() {
}
defer fs.Recycle()
for _, file := range job.TaskProps.Src {
for index, file := range job.TaskProps.Src {
job.TaskModel.SetProgress(index)
err = fs.UploadFromPath(context.Background(), file, path.Join(job.TaskProps.Dst, filepath.Base(file)))
if err != nil {
job.SetErrorMsg("文件转存失败", err)