diff options
author | midipix <writeonce@midipix.org> | 2016-05-20 21:32:12 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-05-20 21:32:12 -0400 |
commit | 431c9953417ba4143087e25e0bf7c5863df8682f (patch) | |
tree | 7c64a01823b5e6d889da6b874e963113b21cb72d /src | |
parent | fe97e7cb46a373d0e1e2ac076271bde9a38083e9 (diff) | |
download | slibtool-431c9953417ba4143087e25e0bf7c5863df8682f.tar.bz2 slibtool-431c9953417ba4143087e25e0bf7c5863df8682f.tar.xz |
execute mode: properly handle the current working directory.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/slbt_exec_execute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_execute.c b/src/logic/slbt_exec_execute.c index 33f7858..277bb30 100644 --- a/src/logic/slbt_exec_execute.c +++ b/src/logic/slbt_exec_execute.c @@ -45,7 +45,8 @@ int slbt_exec_execute( script = ectx->cargv[1]; /* wrapper */ - if ((size_t)snprintf(wrapper,sizeof(wrapper),"%s.exe.wrapper", + if ((size_t)snprintf(wrapper,sizeof(wrapper),"%s%s.exe.wrapper", + (script[0] == '/') ? "" : "./", script) >= sizeof(wrapper)) { slbt_free_exec_ctx(actx); |