config: fix path handling.

This commit is contained in:
Christopher Jeffrey 2017-01-26 01:03:58 -08:00
parent 977ef01d5a
commit e52130ef29
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -231,7 +231,7 @@ config.toOptions = function toOptions(data) {
options.sigcacheSize = num(data.sigcachesize);
// Node
options.prefix = path(prefix, prefix);
options.prefix = path(prefix);
options.db = str(data.db);
options.maxFiles = num(data.maxfiles);
options.cacheSize = mul(data.cachesize, 1024 * 1024);
@ -738,7 +738,8 @@ function path(value, prefix) {
value = util.HOME + value.substring(1);
break;
case '@': // prefix
value = prefix + value.substring(1);
if (prefix)
value = prefix + value.substring(1);
break;
default: // cwd
break;