Skip to content

Commit

Permalink
cmd/uplink: fix cp on a large file with single part
Browse files Browse the repository at this point in the history
We also need to update partSize, if we force the upload to be a single
part.

Change-Id: I9d52a64e143878bb0a8859665c7ef8a05b91fd92
  • Loading branch information
egonelbre authored and andriikotko committed Mar 15, 2024
1 parent b8f452d commit 50d8aaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/uplink/cmd_cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ func (c *cmdCp) copyFile(ctx context.Context, fs ulfs.Filesystem, source, dest u
parallelism = 1
}
singlePart = singlePart || parallelism == 1
if singlePart {
partSize = length
}

mwh, err := fs.Create(ctx, dest, &ulfs.CreateOptions{
Expires: c.expires,
Expand Down

0 comments on commit 50d8aaa

Please sign in to comment.