set datadir path when giving filename for config

pull/1256/head
Jeff Becker 4 years ago
parent c4b5b641bb
commit f307c25d3e
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -305,7 +305,8 @@ extern "C"
llarp_config_load_file(const char* fname, struct llarp_config** conf, bool isRelay) llarp_config_load_file(const char* fname, struct llarp_config** conf, bool isRelay)
{ {
llarp_config* c = new llarp_config(); llarp_config* c = new llarp_config();
if (c->impl.Load(fname, isRelay, {})) const fs::path filepath(fname);
if (c->impl.Load(fname, isRelay, filepath.parent_path()))
{ {
*conf = c; *conf = c;
return true; return true;

Loading…
Cancel
Save