Skip to content

Commit

Permalink
fix: pass set retries to transfer command
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 derailed#2584
  • Loading branch information
nobbs committed Mar 5, 2024
1 parent 69cd0cd commit 587eaf2
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
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
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 587eaf2

Please sign in to comment.