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 duplicated files when using directories with leading /

Nick Craig-Wood0ee0812a2bea
diff --git a/backend/union/union.go b/backend/union/union.go
index c93fc0649..fc78e20c3 100644
--- a/backend/union/union.go
+++ b/backend/union/union.go
@@ -834,6 +834,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}
}
+ root = strings.Trim(root, "/")
upstreams := make([]*upstream.Fs, len(opt.Upstreams))
errs := Errors(make([]error, len(opt.Upstreams)))
multithread(len(opt.Upstreams), func(i int) {