diff --git a/crates/engine/src/script/dom/raster_capture.rs b/crates/engine/src/script/dom/raster_capture.rs index 36fec48381..38c8eb5437 100644 --- a/crates/engine/src/script/dom/raster_capture.rs +++ b/crates/engine/src/script/dom/raster_capture.rs @@ -386,17 +386,21 @@ thread_local! { /// file number, so a path spelled in another letter case on a volume that ignores case still /// matches. On Windows a real path carries the letter case stored on disk. fn same_folder(a: &std::path::Path, b: &std::path::Path) -> bool { - if a == b { - return true; - } #[cfg(unix)] { use std::os::unix::fs::MetadataExt; + if a == b { + return true; + } if let (Ok(x), Ok(y)) = (std::fs::metadata(a), std::fs::metadata(b)) { return x.dev() == y.dev() && x.ino() == y.ino(); } + false + } + #[cfg(not(unix))] + { + a == b } - false } /// Whether two existing paths name one file on disk, such as two hard links to it: the same device