Fix reading.
This commit is contained in:
@@ -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()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user