fstest: fix upwrapping tests for bucket based remotes

TestIntegration/FsRmdirNotFound was failing on crypt wrapping a bucket based remote.

This was spotted by the integration tests.
This commit is contained in:
Nick Craig-Wood 2020-09-01 15:43:41 +01:00
parent 3f0d54daae
commit e2816629d0

View File

@ -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