Comparing version 5.0.2 to 5.0.4
'use strict' | ||
module.exports = (mode, isDir) => { | ||
module.exports = (mode, isDir, portable) => { | ||
mode &= 0o7777 | ||
// in portable mode, use the minimum reasonable umask | ||
// if this system creates files with 0o664 by default | ||
// (as some linux distros do), then we'll write the | ||
// archive with 0o644 instead. Also, don't ever create | ||
// a file that is not readable/writable by the owner. | ||
if (portable) { | ||
mode = (mode | 0o600) &~0o22 | ||
} | ||
// if dirs are readable, then they should be listable | ||
@@ -5,0 +15,0 @@ if (isDir) { |
@@ -118,3 +118,3 @@ 'use strict' | ||
[MODE] (mode) { | ||
return modeFix(mode, this.type === 'Directory') | ||
return modeFix(mode, this.type === 'Directory', this.portable) | ||
} | ||
@@ -410,3 +410,3 @@ | ||
[MODE] (mode) { | ||
return modeFix(mode, this.type === 'Directory') | ||
return modeFix(mode, this.type === 'Directory', this.portable) | ||
} | ||
@@ -413,0 +413,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "tar for node", | ||
"version": "5.0.2", | ||
"version": "5.0.4", | ||
"repository": { | ||
@@ -43,3 +43,3 @@ "type": "git", | ||
"index.js", | ||
"lib/" | ||
"lib/*.js" | ||
], | ||
@@ -46,0 +46,0 @@ "tap": { |
@@ -287,4 +287,5 @@ # node-tar | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `preservePaths` Allow absolute paths. By default, `/` is stripped | ||
@@ -488,4 +489,5 @@ from absolute paths. [Alias: `P`] | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `preservePaths` Allow absolute paths. By default, `/` is stripped | ||
@@ -540,4 +542,5 @@ from absolute paths. [Alias: `P`] | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `preservePaths` Allow absolute paths. By default, `/` is stripped | ||
@@ -588,4 +591,5 @@ from absolute paths. [Alias: `P`] | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `preservePaths` Allow absolute paths. By default, `/` is stripped | ||
@@ -802,4 +806,5 @@ from absolute paths. | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `myuid` If supported, the uid of the user running the current | ||
@@ -842,4 +847,5 @@ process. | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `maxReadSize` The maximum buffer size for `fs.read()` operations. | ||
@@ -892,4 +898,5 @@ Defaults to 1 MB. | ||
`uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note | ||
that `mtime` is still included, because this is necessary other | ||
time-based operations. | ||
that `mtime` is still included, because this is necessary for other | ||
time-based operations. Additionally, `mode` is set to a "reasonable | ||
default" for most unix systems, based on a `umask` value of `0o22`. | ||
- `preservePaths` Allow absolute paths. By default, `/` is stripped | ||
@@ -896,0 +903,0 @@ from absolute paths. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147553
3229
1032