mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-08 09:08:47 +00:00
fix: truncate file for writing
This commit is contained in:
parent
83279ae339
commit
f44a25d679
1 changed files with 1 additions and 0 deletions
|
@ -19,6 +19,7 @@ pub fn get_writer(path_s: &String) -> BufWriter<std::fs::File> {
|
|||
let file = OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(path)
|
||||
.expect("Could not open file");
|
||||
BufWriter::new(file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue