Comparing version 0.2.0 to 0.2.1
@@ -124,5 +124,5 @@ var tar = require('tar-stream'); | ||
var now = new Date(); | ||
var umask = ~process.umask(); | ||
var dmode = 0; | ||
var fmode = 0; | ||
var umask = typeof opts.umask === 'number' ? ~opts.umask : ~process.umask(); | ||
var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0; | ||
var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0; | ||
@@ -129,0 +129,0 @@ if (opts.readable) { |
{ | ||
"name": "tar-fs", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "filesystem bindings for tar-stream", | ||
@@ -5,0 +5,0 @@ "repository": "git://github.com:mafintosh/tar-fs.git", |
@@ -40,8 +40,8 @@ # tar-fs | ||
Set `options.readable` and `options.writable` to ensure that files extracted are readable and/or writable | ||
Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes | ||
``` js | ||
var extract = tar.extract('./my-directory', { | ||
readable: true, | ||
writable: true | ||
dmode: 0555, // all dirs and files should be readable | ||
fmode: 0444 | ||
}); | ||
@@ -48,0 +48,0 @@ ``` |
10354