Skip to content

Commit 000eed9

Browse files
authored
fix detection of stale htslib files (#273)
1 parent 0d48b11 commit 000eed9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hts-sys/build.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ const FILES: &[&str] = &[
6060
fn main() {
6161

6262
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
63-
if !out.join("htslib").exists() {
64-
println!("copying...");
65-
copy_directory("htslib", &out).unwrap();
63+
let htslib_copy = out.join("htslib");
64+
65+
if htslib_copy.exists() {
66+
std::fs::remove_dir_all(htslib_copy).unwrap();
6667
}
68+
copy_directory("htslib", &out).unwrap();
6769

6870
let mut cfg = cc::Build::new();
69-
71+
7072
// default files
7173
let out_htslib = out.join("htslib");
7274
let htslib = PathBuf::from("htslib");

0 commit comments

Comments
 (0)