Skip to content
Snippets Groups Projects
Commit a82755ef authored by Adrien Béraud's avatar Adrien Béraud
Browse files

manager: load config before creating account

Change-Id: I5ab8b5bf1de8ba0dd8b51aa014418fe2d30e3369
parent 72b3b4ae
No related branches found
No related tags found
No related merge requests found
...@@ -2815,9 +2815,10 @@ Manager::loadAccountMap(const YAML::Node& node) ...@@ -2815,9 +2815,10 @@ Manager::loadAccountMap(const YAML::Node& node)
+ DIR_SEPARATOR_STR + "config.yml"] { + DIR_SEPARATOR_STR + "config.yml"] {
if (fileutils::isFile(configFile)) { if (fileutils::isFile(configFile)) {
try { try {
auto configNode = YAML::LoadFile(configFile);
if (auto a = accountFactory.createAccount(JamiAccount::ACCOUNT_TYPE, dir)) { if (auto a = accountFactory.createAccount(JamiAccount::ACCOUNT_TYPE, dir)) {
auto config = a->buildConfig(); auto config = a->buildConfig();
config->unserialize(YAML::LoadFile(configFile)); config->unserialize(configNode);
a->setConfig(std::move(config)); a->setConfig(std::move(config));
} }
} catch (const std::exception& e) { } catch (const std::exception& e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment