From 03de68da1494f45082bcdc31318f1de5c3a21da9 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Mon, 18 Nov 2024 17:22:43 +0000 Subject: [PATCH] remove windows flag --- object_store/src/local.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/object_store/src/local.rs b/object_store/src/local.rs index f9b034ede1a..c62d1987ce0 100644 --- a/object_store/src/local.rs +++ b/object_store/src/local.rs @@ -895,20 +895,7 @@ pub(crate) fn chunked_stream( .boxed() } -#[allow(unused_mut)] -pub(crate) fn read_range( - file: &mut File, - path: &PathBuf, - mut range: Range, -) -> Result { - // On windows, range requests beyond the end of the file fail, so we shorten the range to not - // go beyond the end. - #[cfg(target_os = "windows")] - { - let file_len = file.seek(SeekFrom::End(0)).context(SeekSnafu { path })?; - range = range.start..range.end.min(file_len as usize); - } - +pub(crate) fn read_range(file: &mut File, path: &PathBuf, range: Range) -> Result { let to_read = range.end - range.start; let seek_idx = file .seek(SeekFrom::Start(range.start as u64))