From ab5aebed05900b508d8f4ba9bbc230f119a3ac02 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Mar 2018 15:39:47 +0300 Subject: Import: fix for original internal account name prevention (causes status icons to be mixed up) - also fixes #1210 --- plugins/Import/src/import.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index a7bf297e11..6a43144059 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -476,7 +476,11 @@ bool ImportAccounts(OBJLIST &arSkippedModules) } if (p->pa == nullptr) { - p->pa = Proto_CreateAccount(nullptr, p->szBaseProto, p->tszSrcName); + char *szNewInternalName = nullptr; // create a new internal name by default + if (!Proto_GetAccount(p->szSrcAcc)) + szNewInternalName = p->szSrcAcc; // but if the original internal name is available, keep it + + p->pa = Proto_CreateAccount(szNewInternalName, p->szBaseProto, p->tszSrcName); if (p->pa == nullptr) { AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto); continue; -- cgit v1.2.3