Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 95e1fe9

Browse files
committed
standard
1 parent 4d8d896 commit 95e1fe9

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ exports.pack = function (cwd, opts) {
6868
if (opts.strip) map = strip(map, opts.strip)
6969

7070
if (opts.readable) {
71-
dmode |= 0555
72-
fmode |= 0444
71+
dmode |= parseInt(555, 8)
72+
fmode |= parseInt(444, 8)
7373
}
7474
if (opts.writable) {
75-
dmode |= 0333
76-
fmode |= 0222
75+
dmode |= parseInt(333, 8)
76+
fmode |= parseInt(222, 8)
7777
}
7878

7979
var onlink = function (filename, header) {
@@ -144,7 +144,7 @@ exports.pack = function (cwd, opts) {
144144
}
145145

146146
var head = function (list) {
147-
return list.length ? list[list.length-1] : null
147+
return list.length ? list[list.length - 1] : null
148148
}
149149

150150
var processGetuid = function () {
@@ -175,12 +175,12 @@ exports.extract = function (cwd, opts) {
175175
if (opts.strip) map = strip(map, opts.strip)
176176

177177
if (opts.readable) {
178-
dmode |= 0555
179-
fmode |= 0444
178+
dmode |= parseInt(555, 8)
179+
fmode |= parseInt(444, 8)
180180
}
181181
if (opts.writable) {
182-
dmode |= 0333
183-
fmode |= 0222
182+
dmode |= parseInt(333, 8)
183+
fmode |= parseInt(222, 8)
184184
}
185185

186186
var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry
@@ -258,10 +258,10 @@ exports.extract = function (cwd, opts) {
258258

259259
if (header.type === 'directory') {
260260
stack.push([name, header.mtime])
261-
return mkdirp(name, {fs:xfs}, stat)
261+
return mkdirp(name, {fs: xfs}, stat)
262262
}
263263

264-
mkdirp(path.dirname(name), {fs:xfs}, function (err) {
264+
mkdirp(path.dirname(name), {fs: xfs}, function (err) {
265265
if (err) return next(err)
266266
if (header.type === 'symlink') return onlink()
267267

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
],
1818
"devDependencies": {
1919
"rimraf": "^2.2.8",
20+
"standard": "^4.5.4",
2021
"tape": "^3.0.0"
2122
},
2223
"scripts": {
23-
"test": "tape test/index.js"
24+
"test": "standard && tape test/index.js"
2425
},
2526
"bugs": {
2627
"url": "https://github.com/mafintosh/tar-fs/issues"

0 commit comments

Comments
 (0)