fix bug: writes on untruncated histfiles

pull/9143/head
Ingrid 7 months ago
parent 71217afc0c
commit bf0429004b

@ -10,6 +10,7 @@ pub fn write_history<T: Serialize>(filepath: PathBuf, entries: &Vec<T>) {
let file = OpenOptions::new() let file = OpenOptions::new()
.write(true) .write(true)
.create(true) .create(true)
.truncate(true)
.open(filepath) .open(filepath)
// TODO: do something about this unwrap // TODO: do something about this unwrap
.unwrap(); .unwrap();

Loading…
Cancel
Save