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

fstest: fix upwrapping tests for bucket based remotes

Nick Craig-Woode2816629d09c
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 5ea310e95..381d64ae1 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -335,7 +335,8 @@ func Run(t *testing.T, opt *Opt) {
// Return true if f (or any of the things it wraps) is bucket
// based but not at the root.
isBucketBasedButNotRoot := func(f fs.Fs) bool {
- return fs.UnWrapFs(f).Features().BucketBased && strings.Contains(strings.Trim(f.Root(), "/"), "/")
+ f = fs.UnWrapFs(f)
+ return f.Features().BucketBased && strings.Contains(strings.Trim(f.Root(), "/"), "/")
}
// Initialise the remote