1
0
mirror of https://github.com/rclone/rclone.git synced 2025-01-29 21:04:23 +02:00

bisync: fix maxDelete parameter being ignored via the rc

See: https://forum.rclone.org/t/bisync-maxdelete-api/37215
This commit is contained in:
Nick Craig-Wood 2023-04-03 11:15:59 +01:00
parent 037a6bd1b0
commit d67ef19f6e
2 changed files with 1 additions and 2 deletions

View File

@ -128,7 +128,6 @@ var commandDefinition = &cobra.Command{
ctx := context.Background() ctx := context.Background()
opt := Opt opt := Opt
opt.applyContext(ctx) opt.applyContext(ctx)
if tzLocal { if tzLocal {
TZ = time.Local TZ = time.Local
} }

View File

@ -34,7 +34,7 @@ func rcBisync(ctx context.Context, in rc.Params) (out rc.Params, err error) {
if maxDelete < 0 || maxDelete > 100 { if maxDelete < 0 || maxDelete > 100 {
return nil, rc.NewErrParamInvalid(errors.New("maxDelete must be a percentage between 0 and 100")) return nil, rc.NewErrParamInvalid(errors.New("maxDelete must be a percentage between 0 and 100"))
} }
ci.MaxDelete = maxDelete opt.MaxDelete = int(maxDelete)
} else if rc.NotErrParamNotFound(err) { } else if rc.NotErrParamNotFound(err) {
return nil, err return nil, err
} }