aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs_write.go
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/filesys/wfs_write.go
parentf375b93aefd8d7358df7ff5232d522a31bd15afb (diff)
downloadseaweedfs-e219c578490454aced96b046dceb7313dbbb4a47.tar.xz
seaweedfs-e219c578490454aced96b046dceb7313dbbb4a47.zip
passing full path when assign volume locations
Diffstat (limited to 'weed/filesys/wfs_write.go')
-rw-r--r--weed/filesys/wfs_write.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/filesys/wfs_write.go b/weed/filesys/wfs_write.go
index 53589b02c..83e40e7f5 100644
--- a/weed/filesys/wfs_write.go
+++ b/weed/filesys/wfs_write.go
@@ -10,9 +10,10 @@ import (
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/security"
+ "github.com/chrislusf/seaweedfs/weed/util"
)
-func (wfs *WFS) saveDataAsChunk(dir string) filer.SaveDataAsChunkFunctionType {
+func (wfs *WFS) saveDataAsChunk(fullPath util.FullPath) filer.SaveDataAsChunkFunctionType {
return func(reader io.Reader, filename string, offset int64) (chunk *filer_pb.FileChunk, collection, replication string, err error) {
var fileId, host string
@@ -26,7 +27,7 @@ func (wfs *WFS) saveDataAsChunk(dir string) filer.SaveDataAsChunkFunctionType {
Collection: wfs.option.Collection,
TtlSec: wfs.option.TtlSec,
DataCenter: wfs.option.DataCenter,
- Path: dir,
+ Path: string(fullPath),
}
resp, err := client.AssignVolume(context.Background(), request)