aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_cat.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_fs_cat.go')
-rw-r--r--weed/shell/command_fs_cat.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/weed/shell/command_fs_cat.go b/weed/shell/command_fs_cat.go
index b1d4eea14..7177d8ac3 100644
--- a/weed/shell/command_fs_cat.go
+++ b/weed/shell/command_fs_cat.go
@@ -30,20 +30,18 @@ func (c *commandFsCat) Help() string {
func (c *commandFsCat) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
- input := findInputDirectory(args)
-
- filerServer, filerPort, path, err := commandEnv.parseUrl(input)
+ path, err := commandEnv.parseUrl(findInputDirectory(args))
if err != nil {
return err
}
- if commandEnv.isDirectory(filerServer, filerPort, path) {
+ if commandEnv.isDirectory(path) {
return fmt.Errorf("%s is a directory", path)
}
dir, name := util.FullPath(path).DirAndName()
- return commandEnv.withFilerClient(filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
+ return commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
request := &filer_pb.LookupDirectoryEntryRequest{
Name: name,