Index: pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart |
index fba6fbfb8af1516f845e95420894a019237c5c38..5b79b503bf684d411c490ba3029fb352d6e6f348 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart |
@@ -159,7 +159,7 @@ class FileByteStore implements ByteStore { |
void put(String key, List<int> bytes) { |
try { |
File tempFile = _getFileForKey(_tempName); |
- tempFile.writeAsBytesSync(bytes); |
+ tempFile.writeAsBytesSync(bytes, flush: true); |
File file = _getFileForKey(key); |
tempFile.renameSync(file.path); |
} catch (_) {} |