Skip to content

Commit

Permalink
fix(sys): properly renew dylib symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Dec 9, 2024
1 parent d8bcfd7 commit 4b6b163
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ort-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ fn copy_libraries(lib_dir: &Path, out_dir: &Path) {
let lib_path = lib_file.path();
let lib_name = lib_path.file_name().unwrap();
let out_path = out_dir.join(lib_name);
if out_path.is_symlink() {
fs::remove_file(&out_path).unwrap();
}
if !out_path.exists() {
if out_path.is_symlink() {
fs::remove_file(&out_path).unwrap();
}
#[cfg(windows)]
if std::os::windows::fs::symlink_file(&lib_path, &out_path).is_err() {
copy_fallback = true;
Expand Down

0 comments on commit 4b6b163

Please sign in to comment.