Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Workaround for fs.readdir bug
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Dec 2, 2011
1 parent 48ee0f6 commit 6370167
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils/tar.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
files = files.filter(function (f) {
return f && f.indexOf("\0") === -1
})
cb(er, files && path.resolve(tmp, files[0]))
// XXX fs.readdir doesn't release the dir properly on windows.
// Remove this when that is fixed.
setTimeout(function () {
cb(er, files && path.resolve(tmp, files[0]))
}, 50)
})
}

Expand Down

0 comments on commit 6370167

Please sign in to comment.