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

manager: don't delete account if alias is empty

Change-Id: I93cc9a7e2c365bf84f64ef6ffbd05131b76ccfae
parent 87259d0b
No related branches found
No related tags found
No related merge requests found
...@@ -557,13 +557,11 @@ Manager::ManagerPimpl::loadAccount(const YAML::Node &node, int &errorCount, ...@@ -557,13 +557,11 @@ Manager::ManagerPimpl::loadAccount(const YAML::Node &node, int &errorCount,
std::string accountid; std::string accountid;
parseValue(node, "id", accountid); parseValue(node, "id", accountid);
std::string accountAlias;
parseValue(node, "alias", accountAlias);
const auto inAccountOrder = [&](const std::string & id) { const auto inAccountOrder = [&](const std::string & id) {
return accountOrder.find(id + "/") != std::string::npos; return accountOrder.find(id + "/") != std::string::npos;
}; };
if (!accountid.empty() and !accountAlias.empty()) { if (!accountid.empty()) {
if (not inAccountOrder(accountid)) { if (not inAccountOrder(accountid)) {
RING_WARN("Dropping account %s, which is not in account order", accountid.c_str()); RING_WARN("Dropping account %s, which is not in account order", accountid.c_str());
} else if (base_.accountFactory.isSupportedType(accountType.c_str())) { } else if (base_.accountFactory.isSupportedType(accountType.c_str())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment