diff --git a/fs/override.go b/fs/override.go index b06c0d070..9ba8c4aef 100644 --- a/fs/override.go +++ b/fs/override.go @@ -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,