Skip to content

Commit

Permalink
Force release (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellflitton authored Nov 29, 2024
1 parent 349ffc2 commit bc47da3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions modules/core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ fn unpack_onnx() -> std::io::Result<()> {
let lib_path = lib_path.to_str().unwrap();
println!("Surrealml Core Debug: lib_path={}", lib_path);

// Check if the path exists
if fs::metadata(lib_path).is_ok() {
println!("Surrealml Core Debug: lib_path exists");
} else {
println!("Surrealml Core Debug: lib_path does not exist");
// Extract the directory path
if let Some(parent) = std::path::Path::new(lib_path).parent() {
// Print the contents of the directory
match fs::read_dir(parent) {
Ok(entries) => {
println!("Surrealml Core Debug: content of directory {}", parent.display());
for entry in entries {
if let Ok(entry) = entry {
println!("{}", entry.path().display());
}
}
}
Err(e) => {
println!("Surrealml Core Debug: Failed to read directory {}: {}", parent.display(), e);
}
}
} else {
println!("Surrealml Core Debug: Could not determine the parent directory of the path.");
}
}

// put it next to the file of the embedding
let destination = Path::new(target_lib);
fs::copy(lib_path, destination)?;
Expand Down

0 comments on commit bc47da3

Please sign in to comment.