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

union: fix treatment of remotes with // in

Nick Craig-Woodf26abc89a635
diff --git a/backend/union/upstream/upstream.go b/backend/union/upstream/upstream.go
index 93b8ae521..86575c512 100644
--- a/backend/union/upstream/upstream.go
+++ b/backend/union/upstream/upstream.go
@@ -6,8 +6,6 @@ import (
"fmt"
"io"
"math"
- "path"
- "path/filepath"
"strings"
"sync"
"sync/atomic"
@@ -91,7 +89,7 @@ func New(ctx context.Context, remote, root string, cacheTime time.Duration) (*Fs
return nil, err
}
f.RootFs = rFs
- rootString := path.Join(remote, filepath.ToSlash(root))
+ rootString := fspath.JoinRootPath(remote, root)
myFs, err := cache.Get(ctx, rootString)
if err != nil && err != fs.ErrorIsFile {
return nil, err