diff --git a/crates/effects/src/ocio/lut.rs b/crates/effects/src/ocio/lut.rs index de931a411..e1fbf0ffe 100644 --- a/crates/effects/src/ocio/lut.rs +++ b/crates/effects/src/ocio/lut.rs @@ -284,7 +284,7 @@ pub fn load_file(src: &str) -> Option> { parse_file(src, "") } else { let ext = std::path::Path::new(src_t).extension().and_then(std::ffi::OsStr::to_str).unwrap_or(""); - std::fs::read_to_string(src_t).ok().and_then(|t| parse_file(&t, ext)) + crate::utility::read_text_file(std::path::Path::new(src_t)).ok().and_then(|t| parse_file(&t, ext)) } .map(Arc::new); if let Ok(mut m) = cache.lock() { diff --git a/crates/effects/src/utility.rs b/crates/effects/src/utility.rs index 2098764f2..b93698c33 100644 --- a/crates/effects/src/utility.rs +++ b/crates/effects/src/utility.rs @@ -695,6 +695,8 @@ mod read_text_file_tests { assert!(std::process::Command::new("mkfifo").arg(&fifo).status().unwrap().success()); // Opening a FIFO with no writer would block: this returns at once. assert!(super::read_text_file(&fifo).is_err()); + // An OCIO FileTransform source reads through the same bounded reader. + assert!(crate::ocio::load_file(&fifo.to_string_lossy()).is_none()); std::fs::remove_dir_all(&dir).unwrap(); } }