diff --git a/lib/server/root.js b/lib/server/root.js index 95f50d05..51c6fbe5 100644 --- a/lib/server/root.js +++ b/lib/server/root.js @@ -2,20 +2,13 @@ 'use strict'; var DIR = './', - path = require('path'), config = require(DIR + 'config'), mellow = require('mellow'); module.exports = function(dir) { var root = config('root') || '/'; - if (dir === '/') - dir = root; - else - if (root === '/') - dir = mellow.pathToWin(dir); - else - dir = path.join(root, dir); + dir = mellow.pathToWin(dir, root); return dir; };