Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

chunker: refactor to use fspath.SplitFs instead of fspath.Parse #4996

Nick Craig-Wood3761cf68b454
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)