Open the file as write before trying to flush it
This should be enough and shouldn't require append(true) since we're not explicitly writing anything so we're not flushing it so we've no risk of overwriting it
This commit is contained in:
parent
3787106be6
commit
e1d3c471d7
1 changed files with 1 additions and 1 deletions
|
@ -894,7 +894,7 @@ fn exec_linker(sess: &Session, cmd: &mut Command, out_filename: &Path, tmpdir: &
|
|||
|
||||
if let &Ok(ref out) = command_output {
|
||||
if out.status.success() {
|
||||
if let Ok(of) = fs::File::open(out_filename) {
|
||||
if let Ok(of) = fs::OpenOptions::new().write(true).open(out_filename) {
|
||||
of.sync_all()?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue