mirror of
https://github.com/rclone/rclone.git
synced 2025-03-10 05:08:53 +01:00
union: fix multiple files being uploaded when roots don't exist
See: https://forum.rclone.org/t/union-backend-copying-to-all-remotes-while-it-shouldnt/31781
This commit is contained in:
parent
a6fba1f0c6
commit
9ba253a355
@ -169,7 +169,11 @@ func (f *Fs) mkdir(ctx context.Context, dir string) ([]*upstream.Fs, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return upstreams, nil
|
// If created roots then choose one
|
||||||
|
if dir == "" {
|
||||||
|
upstreams, err = f.create(ctx, dir)
|
||||||
|
}
|
||||||
|
return upstreams, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mkdir makes the root directory of the Fs object
|
// Mkdir makes the root directory of the Fs object
|
||||||
|
Loading…
Reference in New Issue
Block a user