config: make config_dir absolute

This makes it easier for DB drivers and plugins
This commit is contained in:
darosior 2019-10-05 19:17:36 +02:00 committed by Rusty Russell
parent f019dc3d71
commit 65479ab308

View File

@ -860,6 +860,8 @@ static void handle_minimal_config_opts(struct lightningd *ld,
&ld->config_dir,
"Set working directory. All other files are relative to this");
ld->config_dir = path_join(ld, path_cwd(tmpctx), take(ld->config_dir));
ld->wallet_dsn = tal_fmt(ld, "sqlite3://%s/lightningd.sqlite3", ld->config_dir);
opt_register_early_arg("--wallet", opt_set_talstr, NULL,
&ld->wallet_dsn,