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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index d83935c..0bc474d 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -867,10 +867,15 @@ static int slbt_exec_link_remove_file(
struct slbt_exec_ctx * ectx,
const char * target)
{
+ int fdcwd;
+
(void)ectx;
+ /* fdcwd */
+ fdcwd = slbt_driver_fdcwd(dctx);
+
/* remove target (if any) */
- if (!(unlink(target)) || (errno == ENOENT))
+ if (!unlinkat(fdcwd,target,0) || (errno == ENOENT))
return 0;
return SLBT_SYSTEM_ERROR(dctx,0);