fix: pass set retries to transfer command (#2596)

The newly introduced retries field in the transfer dialog was not
passed to the transfer command. This commit fixes that.

Follow-up of #2584
mine
Alexej Disterhoft 2024-03-06 20:47:29 +01:00 committed by GitHub
parent 00213115be
commit 0403a9310d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -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() {

View File

@ -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)
}