truncate in save_to_file
This commit is contained in:
parent
4161dd8df8
commit
8e93a4224b
@ -63,6 +63,7 @@ pub fn save_to_file(idfile: &str, content: &str) -> Result<()> {
|
||||
OpenOptions::new()
|
||||
.create(true)
|
||||
.write(true)
|
||||
.truncate(true)
|
||||
.open(filepath)?
|
||||
.write_all(content.as_bytes())?;
|
||||
Ok(())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user