aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-05-21 01:25:30 -0700
committerChris Lu <chris.lu@gmail.com>2018-05-21 01:25:30 -0700
commit9dd228747cd2f6e7f61168e1f394a320bf542623 (patch)
tree9ac2b832099f82310577e494d66991c8d59c177c /weed/command
parentf07482382b067b84e917e4d1c3581fe1373957de (diff)
downloadseaweedfs-9dd228747cd2f6e7f61168e1f394a320bf542623.tar.xz
seaweedfs-9dd228747cd2f6e7f61168e1f394a320bf542623.zip
filer copy added uid/gid
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer_copy.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index 2b286d3d8..4c203fc94 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -68,7 +68,7 @@ func runCopy(cmd *Command, args []string) bool {
return false
}
filerDestination := args[len(args)-1]
- fileOrDirs := args[0 : len(args)-1]
+ fileOrDirs := args[0: len(args)-1]
filerUrl, err := url.Parse(filerDestination)
if err != nil {
@@ -136,7 +136,8 @@ func doEachCopy(fileOrDir string, host string, path string) bool {
path = path + fi.Name()
}
- if err = filer_operation.RegisterFile(host, path, results[0].Fid, parts[0].FileSize, copy.secret); err != nil {
+ if err = filer_operation.RegisterFile(host, path, results[0].Fid, parts[0].FileSize,
+ os.Getuid(), os.Getgid(), copy.secret); err != nil {
fmt.Printf("Failed to register file %s on %s: %v\n", fileOrDir, host, err)
return false
}