Skip to content

Commit ecd7070

Browse files
committed
Call File::sync_all when finalizing encoding
1 parent 9782770 commit ecd7070

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/rustc_serialize/src/opaque.rs

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ impl FileEncoder {
178178

179179
pub fn finish(&mut self) -> FileEncodeResult {
180180
self.flush();
181+
if self.res.is_ok() {
182+
self.res = self.file.sync_all();
183+
}
181184
#[cfg(debug_assertions)]
182185
{
183186
self.finished = true;

0 commit comments

Comments
 (0)