Skip to content

Commit

Permalink
Added back-compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-iyashchyshyn committed Dec 16, 2024
1 parent 8651016 commit 3a302c2
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 160 deletions.
18 changes: 16 additions & 2 deletions services/localfile/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1254,8 +1254,15 @@ func (i *rmCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{
return subcommands.ExitUsageError
}

file := f.Arg(0)
var files []string
if f.NArg() > 1 {
files = f.Args()[1:]
}

req := &pb.RmRequest{
Filenames: f.Args(),
Filename: file,
Filenames: files,
}
client := pb.NewLocalFileClientProxy(state.Conn)
respChan, err := client.RmOneMany(ctx, req)
Expand Down Expand Up @@ -1300,8 +1307,15 @@ func (i *rmdirCmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interfa
return subcommands.ExitUsageError
}

dir := f.Arg(0)
var dirs []string
if f.NArg() > 1 {
dirs = f.Args()[1:]
}

req := &pb.RmdirRequest{
Directories: f.Args(),
Directory: dir,
Directories: dirs,
Recursive: i.recursive,
}
client := pb.NewLocalFileClientProxy(state.Conn)
Expand Down
Loading

0 comments on commit 3a302c2

Please sign in to comment.