Skip to content

Commit

Permalink
fix: pass set retries to transfer command (#2596)
Browse files Browse the repository at this point in the history
The newly introduced retries field in the transfer dialog was not
passed to the transfer command. This commit fixes that.

Follow-up of #2584
  • Loading branch information
nobbs authored Mar 6, 2024
1 parent 0021311 commit 0403a93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/ui/dialog/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func ShowUploads(styles config.Dialog, pages *ui.Pages, opts TransferDialogOpts)
retries := strconv.Itoa(opts.Retries)
f.AddInputField("Retries:", retries, 30, nil, func(v string) {
retries = v

if retriesInt, err := strconv.Atoi(retries); err == nil {
args.Retries = retriesInt
}
})

f.AddButton("OK", func() {
Expand Down
1 change: 1 addition & 0 deletions internal/view/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ func (p *Pod) transferCmd(evt *tcell.EventKey) *tcell.EventKey {
opts = append(opts, strings.TrimSpace(args.From))
opts = append(opts, strings.TrimSpace(args.To))
opts = append(opts, fmt.Sprintf("--no-preserve=%t", args.NoPreserve))
opts = append(opts, fmt.Sprintf("--retries=%d", args.Retries))
if args.CO != "" {
opts = append(opts, "-c="+args.CO)
}
Expand Down

0 comments on commit 0403a93

Please sign in to comment.