fix: seek back to last offset

pull/24376/head
Edd Robinson 2020-04-23 10:38:42 +01:00
parent 7d625648c9
commit e5e3903771
1 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,8 @@ where
let checksum = hasher.finalize(); let checksum = hasher.finalize();
w.write_all(&checksum.to_be_bytes())?; w.write_all(&checksum.to_be_bytes())?;
// seek to last written offset for next caller.
w.seek(SeekFrom::Start(offset as u64))?;
Ok(offset) Ok(offset)
} }
} }