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:
hashmap 2018-10-25 19:46:31 +02:00 committed by Ignotus Peverell
parent 58e68a867e
commit b889069722

View file

@ -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![];