Skip to content

Commit

Permalink
Fix: update copied file permissions with 0o222 (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm committed Apr 12, 2024
1 parent 65e632f commit 8cf535a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/polyfill/fsPoly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class FsPoly {

// Ensure the destination file is writable
const stat = await this.stat(dest);
const chmodOwnerWrite = 0o200;
const chmodOwnerWrite = 0o222; // Node.js' default for file creation is 0o666 (rw)
if (!(stat.mode & chmodOwnerWrite)) {
await fs.promises.chmod(dest, stat.mode | chmodOwnerWrite);
}
Expand Down

0 comments on commit 8cf535a

Please sign in to comment.