diff --git a/fs/sync/sync_test.go b/fs/sync/sync_test.go index 35039ae7f..2d221e492 100644 --- a/fs/sync/sync_test.go +++ b/fs/sync/sync_test.go @@ -152,10 +152,10 @@ func testCopyMetadata(t *testing.T, createEmptySrcDirs bool) { r.CheckDirectoryModTimes(t, dirPath) // Check that the metadata on the directory and file is correct - if features.ReadMetadata { + if features.WriteMetadata && features.ReadMetadata { fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewObject(ctx, t, r.Fremote, filePath), fileMetadata) } - if features.ReadDirMetadata { + if features.WriteDirMetadata && features.ReadDirMetadata { fstest.CheckEntryMetadata(ctx, t, r.Fremote, fstest.NewDirectory(ctx, t, r.Fremote, dirPath), dirMetadata) } if !createEmptySrcDirs {