fix(native): decode Mach protection bits in their proper positions (#586)

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
Rudy Mizrahi Celekli
2026-10-06 00:14:37 +08:00
committed by GitHub
parent ea9c3dab6b
commit 6aba6ae231
2 changed files with 26 additions and 2 deletions
+2 -2
View File
@@ -253,9 +253,9 @@ const permissions = (raw: string | null) => {
const numericValue = numeric(raw);
if (numericValue !== null)
return {
read: (numericValue & 4) !== 0,
read: (numericValue & 1) !== 0,
write: (numericValue & 2) !== 0,
execute: (numericValue & 1) !== 0,
execute: (numericValue & 4) !== 0,
raw,
};
if (/^[r-][w-][x-]$/u.test(raw))