aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_copy.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-20 18:54:59 -0700
committerchrislu <chris.lu@gmail.com>2022-08-20 18:54:59 -0700
commita3553da7f7ce7ecf5e7c5082026218d50b1f7230 (patch)
treec2947caa1bb173e633fc9b46bb4766b475eea79b /weed/command/filer_copy.go
parentd49d0a9fc29db0ae3fd667d3f988561ca8e3b635 (diff)
downloadseaweedfs-a3553da7f7ce7ecf5e7c5082026218d50b1f7230.tar.xz
seaweedfs-a3553da7f7ce7ecf5e7c5082026218d50b1f7230.zip
add fileId to UploadWithRetry return result
Diffstat (limited to 'weed/command/filer_copy.go')
-rw-r--r--weed/command/filer_copy.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index e20087ce4..a196d25f3 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -585,8 +585,7 @@ func detectMimeType(f *os.File) string {
func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, offset int64) (chunk *filer_pb.FileChunk, err error) {
- var finalFileId string
- uploadResult, flushErr, _ := operation.UploadWithRetry(
+ finalFileId, uploadResult, flushErr, _ := operation.UploadWithRetry(
worker,
&filer_pb.AssignVolumeRequest{
Count: 1,
@@ -604,7 +603,6 @@ func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, off
PairMap: nil,
},
func(host, fileId string) string {
- finalFileId = fileId
return fmt.Sprintf("http://%s/%s", host, fileId)
},
reader,