Skip to content

Commit

Permalink
Merge pull request #96 from PierreBeucher/fix-truncate-file
Browse files Browse the repository at this point in the history
fix: truncate file output before writing
  • Loading branch information
PierreBeucher authored Feb 26, 2024
2 parents c4ea509 + 72756ac commit 5646627
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ fn export_file_outputs(outputs: &NovopsOutputs) -> Result<(), anyhow::Error>{
let mut fd = fs::OpenOptions::new()
.create(true)
.write(true)
.truncate(true)
.mode(0o600)
.open(&f.dest)
.with_context(|| format!("Can't open {:?} for write with mode 0600", &f.dest))?;
Expand Down

0 comments on commit 5646627

Please sign in to comment.