diff --git a/crates/ui-egui/build.rs b/crates/ui-egui/build.rs index 039b8b064..2551abf2c 100644 --- a/crates/ui-egui/build.rs +++ b/crates/ui-egui/build.rs @@ -83,7 +83,14 @@ fn craft_fonts(dir: &std::path::Path, wasm: bool, required: bool) -> Result Result Result, String> { let manifest = dir.join("fonts/simplified-chinese-manifest.txt"); println!("cargo::rerun-if-changed={}", manifest.display()); - // `dir` is the canonical checkout: the manifest itself must not lead out of it either. - if manifest.canonicalize().is_ok_and(|real| !real.starts_with(dir)) { - return Err(format!("{} is outside the craft-fonts checkout", manifest.display())); - } let optional = |e: String| -> Result, String> { if required { Err(format!("{}: {e}", manifest.display())) @@ -131,6 +134,10 @@ fn chinese_font_rows(dir: &std::path::Path, required: bool) -> Result match craft_fonts_policy::parse_manifest(&text).and_then(|rows| { craft_fonts_policy::check_declared_scripts(&rows)?;