Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LocalFileSystem with range request that ends beyond end of file #6751

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Seek error
kylebarron committed Nov 18, 2024
commit f1ff1cdf6b13eb7fd80d9c0661b84a1e3b900b0e
2 changes: 1 addition & 1 deletion object_store/src/local.rs
Original file line number Diff line number Diff line change
@@ -905,7 +905,7 @@ pub(crate) fn read_range(
// go beyond the end.
#[cfg(target_os = "windows")]
{
let file_len = file.seek(SeekFrom::End(0))?;
let file_len = file.seek(SeekFrom::End(0)).context(SeekSnafu { path })?;
range = range.start..range.end.min(file_len as usize);
}