From 143d05c068a3c23f9373ccc72e10220581553fb3 Mon Sep 17 00:00:00 2001 From: Googlefan Date: Sun, 23 Feb 2025 05:02:36 +0000 Subject: [PATCH] fix --- crates/sbv2_core/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs index 467a8bc..3ef67b0 100644 --- a/crates/sbv2_core/build.rs +++ b/crates/sbv2_core/build.rs @@ -10,7 +10,9 @@ fn main() -> Result<(), Box> { let out_path = PathBuf::from(&env::var("OUT_DIR").unwrap()).join("all.bin"); println!("cargo:rerun-if-changed=build.rs"); if static_path.exists() { - fs::hard_link(static_path, out_path).unwrap(); + if fs::hard_link(&static_path, &out_path).is_err() { + fs::copy(static_path, out_path).unwrap(); + }; } else { println!("cargo:warning=Downloading dictionary file..."); let mut response =