fix: inverting compat access returns; not the expected return value

This commit is contained in:
2025-04-23 16:45:01 +02:00
parent 0fd2a88e0f
commit 7c32e884f1

View File

@@ -48,9 +48,9 @@ enum faccess_perms {
returns 0 upon success. -1 when errno is set and anything else when one or more of the permissions isn't set */
static inline int faccess(char const* restrict fname, int perms) {
#if defined __unix__ && _POSIX_C_SOURCE >= 200809L
return !access(fname, perms);
return access(fname, perms);
#elif defined _WIN32
return !_access(fname, perms);
return _access(fname, perms);
#else
# error platform unsupported!
#endif