Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: stop using deprecated process.umask
Browse files Browse the repository at this point in the history
Fixes: #95
aduh95 committed Apr 23, 2020
1 parent eb3c1ed commit 8bae980
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
@@ -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) & 0x777

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

0 comments on commit 8bae980

Please sign in to comment.