Skip to content

Commit

Permalink
Merge branch 'boneskull-namespaced'
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Solano committed Nov 4, 2019
2 parents ee49a0f + ed06895 commit 2dab1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var fs = require('fs'),

var rimraf = require('rimraf'),
os = require('os'),
osTmpdir = require('os').tmpdir(),
mkdirp = require('mkdirp'),
rimrafSync = rimraf.sync;

/* HELPERS */
Expand Down Expand Up @@ -252,7 +254,7 @@ function mkdir(affixes, callback) {
callback = p[1];

var dirPath = generateName(affixes, 'd-');
fs.mkdir(dirPath, parseInt('0700', 8), function(err) {
mkdirp(dirPath, 0700, function(err) {
if (!err) {
deleteDirOnExit(dirPath);
}
Expand All @@ -263,7 +265,7 @@ function mkdir(affixes, callback) {

function mkdirSync(affixes) {
var dirPath = generateName(affixes, 'd-');
fs.mkdirSync(dirPath, parseInt('0700', 8));
mkdirp.sync(dirPath, 0700);
deleteDirOnExit(dirPath);
return dirPath;
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
},
"main": "./lib/temp",
"dependencies": {
"rimraf": "~2.6.2"
"rimraf": "~2.6.2",
"mkdirp": "^0.5.1"
},
"keywords": [
"temporary",
Expand Down

0 comments on commit 2dab1db

Please sign in to comment.