Skip to content

Commit 28714b7

Browse files
author
Alex Ivashchenko
committed
Auto create tmp folder for Formidable
1 parent afe1959 commit 28714b7

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

test/common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ var path = require('path');
33

44
var rootDir = path.join(__dirname, '..');
55
common.dir = {
6-
lib: rootDir + '/lib',
7-
fixture: rootDir + '/test/fixture',
8-
tmp: rootDir + '/test/tmp',
6+
lib: path.join(rootDir, '/lib'),
7+
fixture: path.join(rootDir, '/test/fixture'),
8+
tmp: path.join(rootDir, '/test/tmp'),
99
};
1010

1111
common.assert = require('assert');

test/static.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ var path = require('path');
66
var mime = require('mime-types');
77
var common = require('./common');
88

9+
// prepare tmp folder
10+
if (!fs.existsSync(common.dir.tmp))
11+
{
12+
fs.mkdirSync(common.dir.tmp);
13+
}
14+
915
// make it work with self-signed
1016
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
1117

0 commit comments

Comments
 (0)