aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_ls.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-26 16:11:06 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-26 16:11:06 -0700
commit508ec01ab0668ab7ec7ba8a8484e043ac6c7b237 (patch)
tree3ceaa0e7fe6f783fd33acdf399da126805658e7d /weed/shell/command_fs_ls.go
parentf4fcde05b6f0c00490b6ed9b20f7e7af4f36d591 (diff)
downloadseaweedfs-508ec01ab0668ab7ec7ba8a8484e043ac6c7b237.tar.xz
seaweedfs-508ec01ab0668ab7ec7ba8a8484e043ac6c7b237.zip
tweaking
Diffstat (limited to 'weed/shell/command_fs_ls.go')
-rw-r--r--weed/shell/command_fs_ls.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_fs_ls.go b/weed/shell/command_fs_ls.go
index be531e980..569b3bb9b 100644
--- a/weed/shell/command_fs_ls.go
+++ b/weed/shell/command_fs_ls.go
@@ -88,9 +88,9 @@ func (c *commandFsLs) Do(args []string, commandEnv *CommandEnv, writer io.Writer
}
}
- if dir == "/" {
+ if strings.HasSuffix(dir, "/") {
// just for printing
- dir = ""
+ dir = dir[:len(dir)-1]
}
fmt.Fprintf(writer, "%s %3d %s %s %6d %s/%s\n",
fileMode, len(entry.Chunks),