diff --git a/libconfig/src/lib.rs b/libconfig/src/lib.rs index 1d5bbbb..e1ca5f5 100644 --- a/libconfig/src/lib.rs +++ b/libconfig/src/lib.rs @@ -189,10 +189,10 @@ impl Config { if is_str { let mut f = root_dir.create_file("/CONFIG.TXT")?; f.seek(SeekFrom::End(0))?; - f.write(key.as_bytes()); - f.write("=".as_bytes()); - f.write(value.as_slice()); - f.write(NEWLINE); + f.write(key.as_bytes())?; + f.write("=".as_bytes())?; + f.write(value.as_slice())?; + f.write(NEWLINE)?; } else { let dir = root_dir.create_dir("/CONFIG")?; let mut f = dir.create_file(&[key, ".BIN"].concat())?;