From 9dac60d95f2fb933f71e1941bcc30718fd3a3de9 Mon Sep 17 00:00:00 2001 From: James Prevett Date: Mon, 11 Nov 2024 11:32:33 -0600 Subject: [PATCH] Fixed `Stats.hasAccess` other permissions conditional --- src/stats.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/stats.ts b/src/stats.ts index 30b032c8..73bc8214 100644 --- a/src/stats.ts +++ b/src/stats.ts @@ -265,11 +265,9 @@ export abstract class StatsCommon implements Node.Sta } // Others permissions - if (credentials.uid !== this.uid && credentials.gid !== this.gid) { - if (this.mode & S_IROTH) perm |= R_OK; - if (this.mode & S_IWOTH) perm |= W_OK; - if (this.mode & S_IXOTH) perm |= X_OK; - } + if (this.mode & S_IROTH) perm |= R_OK; + if (this.mode & S_IWOTH) perm |= W_OK; + if (this.mode & S_IXOTH) perm |= X_OK; // Perform the access check return (perm & mode) === mode;