aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-10-25 15:46:29 -0700
committerChris Lu <chris.lu@gmail.com>2020-10-25 15:46:29 -0700
commite219c578490454aced96b046dceb7313dbbb4a47 (patch)
tree046be8c3a453f79f7123f91ce60d4c1cee3bf2ee /weed/command
parentf375b93aefd8d7358df7ff5232d522a31bd15afb (diff)
downloadseaweedfs-e219c578490454aced96b046dceb7313dbbb4a47.tar.xz
seaweedfs-e219c578490454aced96b046dceb7313dbbb4a47.zip
passing full path when assign volume locations
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer_copy.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index ffdf4e968..2295faa8a 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -219,7 +219,7 @@ func genFileCopyTask(fileOrDir string, destPath string, fileCopyTaskChan chan Fi
fileCopyTaskChan <- FileCopyTask{
sourceLocation: fileOrDir,
- destinationUrlPath: destPath,
+ destinationUrlPath: destPath+fi.Name(),
fileSize: fi.Size(),
fileMode: fi.Mode(),
uid: uid,
@@ -405,7 +405,7 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
Replication: *worker.options.replication,
Collection: *worker.options.collection,
TtlSec: worker.options.ttlSec,
- Path: task.destinationUrlPath,
+ Path: task.destinationUrlPath+fileName,
}
assignResult, assignError = client.AssignVolume(context.Background(), request)