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

sync: fix tests on backends which can't have empty directories

Nick Craig-Wood76798d5bb138
diff --git a/fs/sync/sync_test.go b/fs/sync/sync_test.go
index 5516e5d91..35039ae7f 100644
--- a/fs/sync/sync_test.go
+++ b/fs/sync/sync_test.go
@@ -97,6 +97,10 @@ func testCopyMetadata(t *testing.T, createEmptySrcDirs bool) {
t.Skip("Skipping as metadata not supported")
}
+ if createEmptySrcDirs && !features.CanHaveEmptyDirectories {
+ t.Skip("Skipping as can't have empty directories")
+ }
+
const content = "hello metadata world!"
const dirPath = "metadata sub dir"
const emptyDirPath = "empty metadata sub dir"