Skip to content

Commit

Permalink
refactor: stop using deprecated process.umask
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Apr 23, 2020
1 parent eb3c1ed commit 2588155
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ class Extractor {

debug('extracting entry', { filename: entry.fileName, isDir: isDir, isSymlink: symlink })

// reverse umask first (~)
const umask = ~process.umask()
// & with processes umask to override invalid perms
const procMode = this.getExtractedMode(mode, isDir) & umask
const procMode = this.getExtractedMode(mode, isDir) & 0o777

// always ensure folders are created
const destDir = isDir ? dest : path.dirname(dest)
Expand Down

0 comments on commit 2588155

Please sign in to comment.