Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storage): fix request token passing for Copier.Run #6863

Merged
merged 3 commits into from Oct 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion storage/copy.go
Expand Up @@ -126,7 +126,7 @@ func (c *Copier) Run(ctx context.Context) (attrs *ObjectAttrs, err error) {
if err != nil {
return nil, err
}
c.RewriteToken = res.token
req.token = res.token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually need to leave the update of c.RewriteToken as well -- this is an exported field of Copier and the user might use this to resume the copy if it's interrupted.

if c.ProgressFunc != nil {
c.ProgressFunc(uint64(res.written), uint64(res.size))
}
Expand Down