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 mkdir at root with remote:/

Nick Craig-Woodd809930e1d75
diff --git a/backend/union/upstream/upstream.go b/backend/union/upstream/upstream.go
index 1c2c0417f..44b3e00e4 100644
--- a/backend/union/upstream/upstream.go
+++ b/backend/union/upstream/upstream.go
@@ -67,7 +67,7 @@ func New(ctx context.Context, remote, root string, cacheTime time.Duration) (*Fs
return nil, err
}
f := &Fs{
- RootPath: root,
+ RootPath: strings.TrimRight(root, "/"),
writable: true,
creatable: true,
cacheExpiry: time.Now().Unix(),