Skip to content

Commit 16c85df

Browse files
Update src/datasets.rs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
1 parent dcf53f3 commit 16c85df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/datasets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ fn upload_from_file(
180180
let ft = detect_from_path(path).unwrap_or_else(|| {
181181
use std::io::Read;
182182
let mut probe = [0u8; 512];
183-
let n = match std::fs::File::open(path) {
183+
let n = { use std::io::Read; f.read(&mut probe).unwrap_or(0) };
184184
Ok(mut f2) => f2.read(&mut probe).unwrap_or(0),
185185
Err(_) => 0,
186186
};

0 commit comments

Comments
 (0)