diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-04 19:27:51 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-04 19:27:51 -0700 |
| commit | af37b374cbe915f033058abad98d648ccce70d5c (patch) | |
| tree | deb4704677e0ac8c660bb81e6e991c38aa22f5f0 /weed/shell/command_fs_tree.go | |
| parent | 766396d249652c1b29771fa1fce65250f9707d1d (diff) | |
| download | seaweedfs-af37b374cbe915f033058abad98d648ccce70d5c.tar.xz seaweedfs-af37b374cbe915f033058abad98d648ccce70d5c.zip | |
weed shell: fs.cd change current directory
Diffstat (limited to 'weed/shell/command_fs_tree.go')
| -rw-r--r-- | weed/shell/command_fs_tree.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/weed/shell/command_fs_tree.go b/weed/shell/command_fs_tree.go index 805b17d2a..5bc3c57b4 100644 --- a/weed/shell/command_fs_tree.go +++ b/weed/shell/command_fs_tree.go @@ -29,19 +29,12 @@ func (c *commandFsTree) Help() string { func (c *commandFsTree) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) { - filerServer, filerPort, path, err := parseFilerUrl(args[len(args)-1]) + filerServer, filerPort, path, err := commandEnv.parseUrl(findInputDirectory(args)) if err != nil { return err } dir, name := filer2.FullPath(path).DirAndName() - if strings.HasSuffix(path, "/") { - if path == "/" { - dir, name = "/", "" - } else { - dir, name = path[0:len(path)-1], "" - } - } ctx := context.Background() |
