Skip to content

Commit

Permalink
Merge pull request #688 from nobodywho-ooo/fix-buildinfo-copy-fail-fa…
Browse files Browse the repository at this point in the history
…llback

Fix build.rs: copy build_info_src into build_info_target
  • Loading branch information
MarcusDunn authored Feb 26, 2025
2 parents 51e9d99 + 5f3a29e commit b0d355c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama-cpp-sys-2/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ fn main() {
std::fs::rename(&build_info_src,&build_info_target).unwrap_or_else(|move_e| {
// Rename may fail if the target directory is on a different filesystem/disk from the source.
// Fall back to copy + delete to achieve the same effect in this case.
std::fs::copy(&build_info_src, &build_info_src).unwrap_or_else(|copy_e| {
std::fs::copy(&build_info_src, &build_info_target).unwrap_or_else(|copy_e| {
panic!("Failed to rename {build_info_src:?} to {build_info_target:?}. Move failed with {move_e:?} and copy failed with {copy_e:?}");
});
std::fs::remove_file(&build_info_src).unwrap_or_else(|e| {
Expand Down

0 comments on commit b0d355c

Please sign in to comment.