union: fix initialisation broken in refactor - fixes #5139

This commit broke the initialisation of the union backend

f17d7c0012 union: refactor to use fspath.SplitFs instead of fs.ParseRemote #4996

This patch fixes it.
This commit is contained in:
Nick Craig-Wood 2021-03-22 17:17:08 +00:00
parent 0fa68bda02
commit b8c1cf7451
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ func New(ctx context.Context, remote, root string, cacheTime time.Duration) (*Fs
return nil, err
}
f.RootFs = rFs
rootString := path.Join(fsPath, filepath.ToSlash(root))
rootString := path.Join(remote, filepath.ToSlash(root))
myFs, err := cache.Get(ctx, rootString)
if err != nil && err != fs.ErrorIsFile {
return nil, err