Skip to content

Commit

Permalink
fix: use copy_with_cp everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
levydsa committed Jan 10, 2025
1 parent 2bb2841 commit 7f92f1b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libsql-ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ fn make_amalgamation() {
.output()
.unwrap();

std::fs::copy(
copy_with_cp(
(SQLITE_DIR.as_ref() as &Path).join("sqlite3.c"),
(BUNDLED_DIR.as_ref() as &Path).join("src/sqlite3.c"),
)
.unwrap();
std::fs::copy(
copy_with_cp(
(SQLITE_DIR.as_ref() as &Path).join("sqlite3.h"),
(BUNDLED_DIR.as_ref() as &Path).join("src/sqlite3.h"),
)
Expand Down Expand Up @@ -287,7 +287,7 @@ fn copy_multiple_ciphers(target: &str, out_dir: &str, out_path: &Path) {
build_multiple_ciphers(target, out_path);
}

std::fs::copy(dylib, format!("{out_dir}/libsqlite3mc.a")).unwrap();
copy_with_cp(dylib, format!("{out_dir}/libsqlite3mc.a")).unwrap();
println!("cargo:rustc-link-lib=static=sqlite3mc");
println!("cargo:rustc-link-search={out_dir}");
}
Expand All @@ -303,9 +303,9 @@ fn build_multiple_ciphers(target: &str, out_path: &Path) {
bindings::write_to_out_dir(header, bindgen_rs_path.as_ref());
}
let dir = env!("CARGO_MANIFEST_DIR");
std::fs::copy(format!("{dir}/{bindgen_rs_path}"), out_path).unwrap();
copy_with_cp(format!("{dir}/{bindgen_rs_path}"), out_path).unwrap();

std::fs::copy(
copy_with_cp(
(BUNDLED_DIR.as_ref() as &Path)
.join("src")
.join("sqlite3.c"),
Expand Down

0 comments on commit 7f92f1b

Please sign in to comment.