summaryrefslogtreecommitdiffhomepage
path: root/src/logic/slbt_exec_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_link.c')
-rw-r--r--src/logic/slbt_exec_link.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 4b5fdc8..23802b1 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -411,6 +411,7 @@ static int slbt_exec_link_create_executable(
char cwd [PATH_MAX];
char output [PATH_MAX];
char wrapper[PATH_MAX];
+ char wraplnk[PATH_MAX];
/* initial state */
slbt_reset_arguments(ectx);
@@ -502,6 +503,16 @@ static int slbt_exec_link_create_executable(
fclose(ectx->fwrapper);
ectx->fwrapper = 0;
+ if ((size_t)snprintf(wraplnk,sizeof(wraplnk),"%s.exe.wrapper",
+ dctx->cctx->output) >= sizeof(wraplnk))
+ return -1;
+
+ if (slbt_create_symlink(
+ dctx,ectx,
+ dctx->cctx->output,wraplnk,
+ false))
+ return -1;
+
if (rename(wrapper,dctx->cctx->output))
return -1;