diff --git a/src/history.rs b/src/history.rs index a7bb2e4a5..4544bdcfa 100644 --- a/src/history.rs +++ b/src/history.rs @@ -1123,9 +1123,8 @@ impl HistoryImpl { break; } - if dst_file.write(&buf[..n]).is_err() { - // This message does not have high enough priority to be shown by default. - FLOG!(history_file, "Error when writing history file"); + if let Err(err) = dst_file.write_all(&buf[..n]) { + FLOG!(history_file, "Error when writing history file:", err); break; } }