diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-23 20:46:17 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-23 20:46:17 -0700 |
| commit | d151185b7e5c7912afc38a36c163ef87eedcde3d (patch) | |
| tree | d1ae92feac61c70596d9266b97b5aea792d3112f /weed/shell/commands.go | |
| parent | 40601953bfb6cfc0d27aee6d5ce07c69eccc48ca (diff) | |
| download | seaweedfs-d151185b7e5c7912afc38a36c163ef87eedcde3d.tar.xz seaweedfs-d151185b7e5c7912afc38a36c163ef87eedcde3d.zip | |
shell: desupport filer url in the arguments
Diffstat (limited to 'weed/shell/commands.go')
| -rw-r--r-- | weed/shell/commands.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/shell/commands.go b/weed/shell/commands.go index 7ca631ab3..660929ec7 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -50,7 +50,8 @@ func NewCommandEnv(options ShellOptions) *CommandEnv { func (ce *CommandEnv) parseUrl(input string) (filerServer string, filerPort int64, path string, err error) { if strings.HasPrefix(input, "http") { - return parseFilerUrl(input) + err = fmt.Errorf("http://<filer>:<port> prefix is not supported any more") + return } if !strings.HasPrefix(input, "/") { input = filepath.ToSlash(filepath.Join(ce.option.Directory, input)) @@ -101,7 +102,7 @@ func parseFilerUrl(entryPath string) (filerServer string, filerPort int64, path } path = u.Path } else { - err = fmt.Errorf("path should have full url http://<filer_server>:<port>/path/to/dirOrFile : %s", entryPath) + err = fmt.Errorf("path should have full url /path/to/dirOrFile : %s", entryPath) } return } |
