diff options
Diffstat (limited to 'initializers')
-rw-r--r-- | initializers/checker.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/initializers/checker.js b/initializers/checker.js index 7a09c02d1..f4458c5cf 100644 --- a/initializers/checker.js +++ b/initializers/checker.js | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | var config = require('config') | 4 | var config = require('config') |
5 | var mkdirp = require('mkdirp') | 5 | var mkdirp = require('mkdirp') |
6 | var path = require('path') | ||
6 | 7 | ||
7 | var checker = { | 8 | var checker = { |
8 | checkConfig: checkConfig, | 9 | checkConfig: checkConfig, |
@@ -32,9 +33,9 @@ | |||
32 | var storages = config.get('storage') | 33 | var storages = config.get('storage') |
33 | 34 | ||
34 | for (var key of Object.keys(storages)) { | 35 | for (var key of Object.keys(storages)) { |
35 | var path = storages[key] | 36 | var dir = storages[key] |
36 | try { | 37 | try { |
37 | mkdirp.sync(__dirname + '/../' + path) | 38 | mkdirp.sync(path.join(__dirname, '..', dir)) |
38 | } catch (error) { | 39 | } catch (error) { |
39 | // Do not use logger | 40 | // Do not use logger |
40 | console.error('Cannot create ' + path + ':' + error) | 41 | console.error('Cannot create ' + path + ':' + error) |