diff --git a/libsbutil/sb_exists.c b/libsbutil/sb_exists.c index 9ec7730..0e2ec25 100644 --- a/libsbutil/sb_exists.c +++ b/libsbutil/sb_exists.c @@ -11,7 +11,7 @@ int sb_exists(int dirfd, const char *pathname, int flags) { struct stat64 buf; - if (faccessat(dirfd, pathname, F_OK, flags) == 0) + if (faccessat(dirfd, pathname, F_OK, flags|AT_EACCESS) == 0) return 0; /* musl's faccessat gives EINVAL when the kernel does not support