mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
union: propagate SlowHash feature
This commit is contained in:
parent
9bf78d0373
commit
6654b66114
@ -894,18 +894,22 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
|||||||
WriteMetadata: true,
|
WriteMetadata: true,
|
||||||
UserMetadata: true,
|
UserMetadata: true,
|
||||||
}).Fill(ctx, f)
|
}).Fill(ctx, f)
|
||||||
canMove := true
|
canMove, slowHash := true, false
|
||||||
for _, f := range upstreams {
|
for _, f := range upstreams {
|
||||||
features = features.Mask(ctx, f) // Mask all upstream fs
|
features = features.Mask(ctx, f) // Mask all upstream fs
|
||||||
if !operations.CanServerSideMove(f) {
|
if !operations.CanServerSideMove(f) {
|
||||||
canMove = false
|
canMove = false
|
||||||
}
|
}
|
||||||
|
slowHash = slowHash || f.Features().SlowHash
|
||||||
}
|
}
|
||||||
// We can move if all remotes support Move or Copy
|
// We can move if all remotes support Move or Copy
|
||||||
if canMove {
|
if canMove {
|
||||||
features.Move = f.Move
|
features.Move = f.Move
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If any of upstreams are SlowHash, propagate it
|
||||||
|
features.SlowHash = slowHash
|
||||||
|
|
||||||
// Enable ListR when upstreams either support ListR or is local
|
// Enable ListR when upstreams either support ListR or is local
|
||||||
// But not when all upstreams are local
|
// But not when all upstreams are local
|
||||||
if features.ListR == nil {
|
if features.ListR == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user