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

fix empty dir test for object based remotes

yparitcher82b3bfec3cac
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 50a9df91b..3e5e48a55 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -494,7 +494,13 @@ func Run(t *testing.T, opt *Opt) {
TestFsListDirEmpty := func(t *testing.T) {
skipIfNotOk(t)
objs, dirs, err := walk.GetAll(context.Background(), remote, "", true, 1)
- require.NoError(t, err)
+ if !remote.Features().CanHaveEmptyDirectories {
+ if err != fs.ErrorDirNotFound {
+ require.NoError(t, err)
+ }
+ } else {
+ require.NoError(t, err)
+ }
assert.Equal(t, []string{}, objsToNames(objs))
assert.Equal(t, []string{}, dirsToNames(dirs))
}