mirror of
https://github.com/rclone/rclone
synced 2024-11-20 21:27:33 +01:00
fs: when creating new fs.OverrideRemotes don't layer overrides if not needed
This commit is contained in:
parent
d6667d34e7
commit
c18c66f167
@ -12,6 +12,13 @@ type OverrideRemote struct {
|
||||
// NewOverrideRemote returns an OverrideRemoteObject which will
|
||||
// return the remote specified
|
||||
func NewOverrideRemote(oi ObjectInfo, remote string) *OverrideRemote {
|
||||
// re-wrap an OverrideRemote
|
||||
if or, ok := oi.(*OverrideRemote); ok {
|
||||
return &OverrideRemote{
|
||||
ObjectInfo: or.ObjectInfo,
|
||||
remote: remote,
|
||||
}
|
||||
}
|
||||
return &OverrideRemote{
|
||||
ObjectInfo: oi,
|
||||
remote: remote,
|
||||
|
Loading…
Reference in New Issue
Block a user