diff options
Diffstat (limited to 'weed/shell/command_volume_copy.go')
| -rw-r--r-- | weed/shell/command_volume_copy.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_copy.go b/weed/shell/command_volume_copy.go index ca8f5c832..8d34acf8f 100644 --- a/weed/shell/command_volume_copy.go +++ b/weed/shell/command_volume_copy.go @@ -33,10 +33,6 @@ func (c *commandVolumeCopy) Help() string { func (c *commandVolumeCopy) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { - if err = commandEnv.confirmIsLocked(); err != nil { - return - } - volCopyCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeIdInt := volCopyCommand.Int("volumeId", 0, "the volume id") sourceNodeStr := volCopyCommand.String("source", "", "the source volume server <host>:<port>") @@ -45,6 +41,10 @@ func (c *commandVolumeCopy) Do(args []string, commandEnv *CommandEnv, writer io. return nil } + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + sourceVolumeServer, targetVolumeServer := pb.ServerAddress(*sourceNodeStr), pb.ServerAddress(*targetNodeStr) volumeId := needle.VolumeId(*volumeIdInt) |
