enigma-bbs/core/config_util.js

18 lines
327 B
JavaScript
Raw Normal View History

2016-01-14 22:56:21 -07:00
/* jslint node: true */
'use strict';
const Config = require('./config.js').get;
// deps
const paths = require('path');
2016-01-14 22:56:21 -07:00
exports.getConfigPath = getConfigPath;
2016-01-14 22:56:21 -07:00
function getConfigPath(filePath) {
2020-06-29 22:26:35 -06:00
if (paths.isAbsolute(filePath)) {
return filePath;
}
2020-06-29 22:26:35 -06:00
return paths.join(Config().paths.config, filePath);
}