Skip to content

Commit

Permalink
LocalFS allow chmod higher that 0o777
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerIn-wonderland committed Nov 15, 2024
1 parent 7e1d057 commit 4b0da86
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/api/LocalFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,15 +614,10 @@ class LocalFS extends AFSProvider<LocalFSStats> {

const currStats = this.stats.get(path) || {};
if (mode > 0o777) {
throw {
name: "EINVAL",
code: "EINVAL",
errno: -22,
message: "Mode cannot be greater than 0o777.",
stack: "LocalFS > chmod",
} as Error;
}
if (!sym) {
// Needed for v86

mode -= mode & 0o170000;
} else if (!sym) {
if (type === "FILE") {
currStats.mode = 0o100000 + mode;
}
Expand Down

0 comments on commit 4b0da86

Please sign in to comment.