From b3077e417056f18225957f65419b87de72117fe3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 7 Feb 2016 10:39:37 +0100 Subject: Standard v6 --- initializers/checker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'initializers/checker.js') 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 @@ var config = require('config') var mkdirp = require('mkdirp') + var path = require('path') var checker = { checkConfig: checkConfig, @@ -32,9 +33,9 @@ var storages = config.get('storage') for (var key of Object.keys(storages)) { - var path = storages[key] + var dir = storages[key] try { - mkdirp.sync(__dirname + '/../' + path) + mkdirp.sync(path.join(__dirname, '..', dir)) } catch (error) { // Do not use logger console.error('Cannot create ' + path + ':' + error) -- cgit v1.2.3