config: expand home directory in config path.

This commit is contained in:
Christopher Jeffrey 2017-05-12 11:43:40 -07:00
parent cecf2c7789
commit 993a27525e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -519,8 +519,11 @@ Config.prototype.getPrefix = function getPrefix() {
var prefix = this.str('prefix');
var network;
if (prefix)
if (prefix) {
if (prefix[0] === '~')
prefix = util.HOME + prefix.substring(1);
return prefix;
}
prefix = util.HOME + '/.' + this.module;
network = this.str('network');