Skip to content

FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust

#2185: the not-read-whole assertion applies where previews stream

irgendwasmitfelixeff5f024e597
diff --git a/crates/engine/src/previews_tests.rs b/crates/engine/src/previews_tests.rs
index 6c5bea75a..95c6289c2 100644
--- a/crates/engine/src/previews_tests.rs
+++ b/crates/engine/src/previews_tests.rs
@@ -302,6 +302,9 @@ fn preview_files_are_streamed_not_read_whole() {
];
std::fs::write(&png, PNG).unwrap();
assert!(s.media.open_bytes("still.png", PNG.into()).is_ok(), "the image opens from its bytes");
- assert!(crate::previews::open_preview_file(&s.media, "still.png", &png).is_none());
+ // (the web, without a file reader, still reads preview files whole)
+ if cfg!(any(unix, windows)) {
+ assert!(crate::previews::open_preview_file(&s.media, "still.png", &png).is_none());
+ }
let _ = std::fs::remove_dir_all(dir);
}