From d809930e1d75cc0c0c8fff5be6bdb42b62053a4c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 16 Feb 2021 16:05:27 +0000 Subject: [PATCH] union: fix mkdir at root with remote:/ Before the this fix if you specified remote:/ then the union backend would fail to notice the root directory existed. This was fixed by stripping the trailing / from the root. See: https://forum.rclone.org/t/upgraded-from-1-45-to-1-54-now-cant-create-new-directory-within-union-mount/22284/ --- backend/union/upstream/upstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),