aboutsummaryrefslogtreecommitdiffstats
path: root/src/export_fun.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/export_fun.rs')
-rw-r--r--src/export_fun.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/export_fun.rs b/src/export_fun.rs
index d8722b4..64810eb 100644
--- a/src/export_fun.rs
+++ b/src/export_fun.rs
@@ -355,7 +355,13 @@ fn create_function_hook_res(
let sock_run = session.socket_running.as_ref().ok_or("no socket running")?;
let exe_path = current_exe()?;
let symlink_path = sock_run.bin_path.join(OsStr::from_bytes(fun_name));
- symlink(exe_path, symlink_path)?;
+ if let Err(e) = symlink(exe_path, symlink_path) {
+ match e.kind() {
+ // this is expected to happen when functions get redefined
+ io::ErrorKind::AlreadyExists => (),
+ _ => return Err(e)?,
+ }
+ }
Ok(())
}