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

Commit 20af6e8

Browse files
committed
Merge pull request #29 from Skywalker13/master
Restore the call on utimes on win32 platform
2 parents 00706f5 + d0129ec commit 20af6e8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ exports.extract = function (cwd, opts) {
228228

229229
var stat = function (err) {
230230
if (err) return next(err)
231-
if (win32) return next()
232231
utimes(name, header, function (err) {
233232
if (err) return next(err)
233+
if (win32) return next()
234234
chperm(name, header, next)
235235
})
236236
}

test/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ test('strip + map', function (t) {
164164
})
165165

166166
test('map + dir + permissions', function (t) {
167-
t.plan(2)
167+
t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix
168168

169169
var a = path.join(__dirname, 'fixtures', 'b')
170170
var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms')
@@ -184,7 +184,9 @@ test('map + dir + permissions', function (t) {
184184
var files = fs.readdirSync(b).sort()
185185
var stat = fs.statSync(path.join(b, 'a'))
186186
t.same(files.length, 1)
187-
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
187+
if (!win32) {
188+
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
189+
}
188190
})
189191
})
190192

0 commit comments

Comments
 (0)