From 3761cf68b454e48fd184e014c2785c9a1027011d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 10 Feb 2021 14:32:01 +0000 Subject: [PATCH] chunker: refactor to use fspath.SplitFs instead of fspath.Parse #4996 --- backend/chunker/chunker.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/chunker/chunker.go b/backend/chunker/chunker.go index 72338c723..1d50b5385 100644 --- a/backend/chunker/chunker.go +++ b/backend/chunker/chunker.go @@ -277,14 +277,10 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs, return nil, errors.New("can't point remote at itself - check the value of the remote setting") } - parsed, err := fspath.Parse(remote) + baseName, basePath, err := fspath.SplitFs(remote) if err != nil { return nil, errors.Wrapf(err, "failed to parse remote %q to wrap", remote) } - baseName, basePath := parsed.ConfigString, parsed.Path - if baseName != "" { - baseName += ":" - } // Look for a file first remotePath := fspath.JoinRootPath(basePath, rpath) baseFs, err := cache.Get(ctx, baseName+remotePath)