diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-03-20 06:34:09 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-03-20 06:34:13 -0700 |
| commit | 41cc6e661b8208761a6512db6b8db57d906f0ed7 (patch) | |
| tree | b28ffed9e02c8705227373618aedff32fd302ea7 | |
| parent | b2c1c209a548da5b64cee9ea4639b68ed0a4fc8c (diff) | |
| download | seaweedfs-41cc6e661b8208761a6512db6b8db57d906f0ed7.tar.xz seaweedfs-41cc6e661b8208761a6512db6b8db57d906f0ed7.zip | |
fs.mv ensures there are 2 arguments
| -rw-r--r-- | weed/shell/command_fs_mv.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_fs_mv.go b/weed/shell/command_fs_mv.go index 0a7eed02d..6b96072df 100644 --- a/weed/shell/command_fs_mv.go +++ b/weed/shell/command_fs_mv.go @@ -36,6 +36,10 @@ func (c *commandFsMv) Help() string { func (c *commandFsMv) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { + if len(args) != 2 { + return fmt.Errorf("need to have 2 arguments.") + } + sourcePath, err := commandEnv.parseUrl(args[0]) if err != nil { return err |
