summaryrefslogtreecommitdiff
path: root/plugins/Import/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Import/src')
-rw-r--r--plugins/Import/src/import.cpp6
1 files changed, 5 insertions, 1 deletions
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<char> &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;