passing full path when assign volume locations

This commit is contained in:
Chris Lu
2020-10-25 15:46:29 -07:00
parent f375b93aef
commit e219c57849
7 changed files with 16 additions and 17 deletions

View File

@@ -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)