diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 10:39:37 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 10:39:37 +0100 |
commit | b3077e417056f18225957f65419b87de72117fe3 (patch) | |
tree | be00437c83175ca09b184df6fb21ffe149e11ff8 /initializers | |
parent | c5a8be2b6282d2042e469e1b7c1e7ce8795c026f (diff) | |
download | PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.gz PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.zst PeerTube-b3077e417056f18225957f65419b87de72117fe3.zip |
Standard v6
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) |