Make sure the entire buffer was written (#1842)
We may write just a part of the buffer and we don't check the result, so write_all is probably what we need here
This commit is contained in:
committed by
Ignotus Peverell
parent
58e68a867e
commit
b889069722
+1
-1
@@ -178,7 +178,7 @@ impl AppendOnlyFile {
|
||||
}
|
||||
|
||||
self.buffer_start += self.buffer.len();
|
||||
self.file.write(&self.buffer[..])?;
|
||||
self.file.write_all(&self.buffer[..])?;
|
||||
self.file.sync_all()?;
|
||||
|
||||
self.buffer = vec![];
|
||||
|
||||
Reference in New Issue
Block a user