Skip to content

Commit 1bcae9e

Browse files
committed
using os.tmpDir if available fixes #7
1 parent 2cb42d8 commit 1bcae9e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/tmp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
var
1111
fs = require('fs'),
1212
path = require('path'),
13+
os = require('os'),
1314
exists = fs.exists || path.exists,
15+
tmpDir = os.tmpDir || _getTMPDir,
1416
_c = require('constants');
1517

1618
/**
1719
* The working inner variables.
1820
*/
1921
var
2022
// store the actual TMP directory
21-
_TMP = _getTMPDir(),
23+
_TMP = tmpDir(),
2224

2325
// the random characters to choose from
2426
randomChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",

0 commit comments

Comments
 (0)