mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
17 lines
396 B
JavaScript
17 lines
396 B
JavaScript
(function() {
|
|
'use strict';
|
|
|
|
var DIR = './',
|
|
path = require('path'),
|
|
config = require(DIR + 'config'),
|
|
mellow = require('mellow');
|
|
|
|
module.exports = function(dir) {
|
|
var root = config('root') || '/';
|
|
|
|
if (root === '/')
|
|
dir = mellow.pathToWin(dir);
|
|
|
|
return path.join(root + dir);
|
|
};
|
|
})();
|