summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_uninstall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_uninstall.c')
-rw-r--r--src/logic/slbt_exec_uninstall.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c
index 28a73b2..9f2521c 100644
--- a/src/logic/slbt_exec_uninstall.c
+++ b/src/logic/slbt_exec_uninstall.c
@@ -68,13 +68,18 @@ static int slbt_exec_uninstall_fs_entry(
uint32_t flags)
{
struct stat st;
+ int fdcwd;
char * slash;
char dpath[PATH_MAX];
+ /* fdcwd */
+ fdcwd = slbt_driver_fdcwd(dctx);
+
/* needed? */
- if (stat(path,&st) && (errno == ENOENT))
- if (lstat(path,&st) && (errno == ENOENT))
- return 0;
+ if (fstatat(fdcwd,path,&st,0) && (errno == ENOENT))
+ if (fstatat(fdcwd,path,&st,AT_SYMLINK_NOFOLLOW))
+ if (errno == ENOENT)
+ return 0;
/* output */
*parg = path;