mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 01:20:16 +02:00
sync: allow --max-backlog to be -ve meaning as large as possible
This commit is contained in:
@@ -2,6 +2,7 @@ package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/bits"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -30,6 +31,9 @@ type pipe struct {
|
||||
}
|
||||
|
||||
func newPipe(orderBy string, stats func(items int, totalSize int64), maxBacklog int) (*pipe, error) {
|
||||
if maxBacklog < 0 {
|
||||
maxBacklog = (1 << (bits.UintSize - 1)) - 1 // largest posititive int
|
||||
}
|
||||
less, fraction, err := newLess(orderBy)
|
||||
if err != nil {
|
||||
return nil, fserrors.FatalError(err)
|
||||
|
Reference in New Issue
Block a user