fix: copy task name

This commit is contained in:
Noah Hsu
2022-06-17 21:30:16 +08:00
parent fa6e918fc7
commit b9f9e5853e
2 changed files with 10 additions and 11 deletions

View File

@ -57,8 +57,7 @@ func Copy(ctx context.Context, account driver.Driver, srcPath, dstPath string) (
return false, operations.Copy(ctx, account, srcActualPath, dstActualPath)
}
// not in an account
// TODO add status set callback to put
copyTaskManager.Add(fmt.Sprintf("copy %s to %s", srcActualPath, dstActualPath), func(task *task.Task) error {
copyTaskManager.Add(fmt.Sprintf("copy [%s](%s) to [%s](%s)", srcAccount.GetAccount().VirtualPath, srcActualPath, dstAccount.GetAccount().VirtualPath, dstActualPath), func(task *task.Task) error {
return CopyBetween2Accounts(task.Ctx, srcAccount, dstAccount, srcActualPath, dstActualPath, task.SetStatus)
})
return true, nil