Skip to content

Commit c0571c8

Browse files
authored
fix(update-agent): flush the capsule to disk (#1332)
-- Tiny fix: ensure that data is sync'ed to disk before moving on
1 parent 92c3fb4 commit c0571c8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

update-agent/src/update/capsule.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ where
8686
.create_file(CAPSULE_INSTALL_NAME)
8787
.map_err(|e| Error::CreateFile(e, CAPSULE_INSTALL_NAME.into()))?;
8888
io::copy(&mut src, &mut capsule).map_err(Error::CopyCapsule)?;
89+
capsule.sync_all().map_err(Error::CopyCapsule)?;
8990
Ok(())
9091
}
9192

0 commit comments

Comments
 (0)