aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_rm.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-17 10:18:14 -0700
committerchrislu <chris.lu@gmail.com>2022-09-17 10:18:14 -0700
commit1c79301f89762ed25a431bcb5f4e02858dc02218 (patch)
treed0d6c5c44f7524ec38d7002e393d194769278649 /weed/shell/command_fs_rm.go
parent956ce6416fae66646344782cc7f6f557708eb1f4 (diff)
parent3fc261d27c90fc06c1d555dd998d7535b844a746 (diff)
downloadseaweedfs-1c79301f89762ed25a431bcb5f4e02858dc02218.tar.xz
seaweedfs-1c79301f89762ed25a431bcb5f4e02858dc02218.zip
Merge branch 'master' into message_send
Diffstat (limited to 'weed/shell/command_fs_rm.go')
-rw-r--r--weed/shell/command_fs_rm.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_fs_rm.go b/weed/shell/command_fs_rm.go
index ec29cced9..b8445b7e9 100644
--- a/weed/shell/command_fs_rm.go
+++ b/weed/shell/command_fs_rm.go
@@ -37,10 +37,10 @@ func (c *commandFsRm) Help() string {
func (c *commandFsRm) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
isRecursive := false
ignoreRecursiveError := false
- var entiries []string
+ var entries []string
for _, arg := range args {
if !strings.HasPrefix(arg, "-") {
- entiries = append(entiries, arg)
+ entries = append(entries, arg)
continue
}
for _, t := range arg {
@@ -52,12 +52,12 @@ func (c *commandFsRm) Do(args []string, commandEnv *CommandEnv, writer io.Writer
}
}
}
- if len(entiries) < 1 {
+ if len(entries) < 1 {
return fmt.Errorf("need to have arguments")
}
commandEnv.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
- for _, entry := range entiries {
+ for _, entry := range entries {
targetPath, err := commandEnv.parseUrl(entry)
if err != nil {
fmt.Fprintf(writer, "rm: %s: %v\n", targetPath, err)