make append_file strip newlines

axtloss/rework-partitioning
amy 3 years ago
parent 231d649878
commit b774eeb142

@ -15,7 +15,7 @@ pub fn create_file(path: &str) {
} }
pub fn append_file(path: &str, content: &str) -> std::io::Result<()> { pub fn append_file(path: &str, content: &str) -> std::io::Result<()> {
log(format!("Appending {} to file {}", content, path)); log(format!("Appending {} to file {}", content.replace("\n", ""), path));
let mut file = OpenOptions::new().append(true).open(path)?; let mut file = OpenOptions::new().append(true).open(path)?;
file.write_all(content.as_bytes())?; file.write_all(content.as_bytes())?;
Ok(()) Ok(())

Loading…
Cancel
Save