Skip to content

Commit

Permalink
πŸ› Don't Err on EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
malted committed Aug 31, 2024
1 parent 5f7d085 commit 8deed3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/r2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub async fn read_chunk(file_path: &str, start: usize) -> io::Result<Vec<u8>> {
let mut buffer = vec![0; start + CHUNK_SIZE];

file.seek(io::SeekFrom::Start(start as u64)).await?;
file.read_exact(&mut buffer).await?;
file.read(&mut buffer).await?;

Ok(buffer)
}
Expand Down

0 comments on commit 8deed3d

Please sign in to comment.