shell: desupport filer url in the arguments

This commit is contained in:
Chris Lu
2020-03-23 20:46:17 -07:00
parent 40601953bf
commit d151185b7e
7 changed files with 11 additions and 15 deletions

View File

@@ -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
}