mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 23:47:55 +08:00
shell: desupport filer url in the arguments
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user