Fix reading.

This commit is contained in:
Cutieguwu
2026-01-01 01:09:41 -05:00
parent 7537107144
commit 2df9e8e0f2
2 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
use std::fs::{File, OpenOptions};
use std::io::{self, Seek, SeekFrom};
use std::os::unix::fs::{FileExt, OpenOptionsExt};
use std::os::unix::fs::OpenOptionsExt;
use crate::cli::CONFIG;
@@ -23,7 +23,7 @@ pub fn get_stream_length<S: Seek>(stream: &mut S) -> io::Result<u64> {
pub fn load_input() -> anyhow::Result<File> {
OpenOptions::new()
.read(true)
//.custom_flags(libc::O_DIRECT)
.custom_flags(libc::O_DIRECT)
.open(&CONFIG.input)
.with_context(|| format!("Failed to open input file: {}", &CONFIG.input.display()))