summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_accounts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index acab9db206..97b6f9b345 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -32,26 +32,23 @@ int CToxProto::OnAccountListChanged(WPARAM wParam, LPARAM lParam)
switch (wParam)
{
case PRAC_ADDED:
- if (this->getStringA("ToxID"))
- UninitToxCore();
DialogBoxParam(
g_hInstance,
- MAKEINTRESOURCE(IDD_PROFILE_MANAGER),
+ MAKEINTRESOURCE(IDD_PROFILE_IMPORT),
account->hwndAccMgrUI,
CToxProto::ToxProfileManagerProc,
(LPARAM)this);
InitToxCore();
+ SaveToxProfile();
break;
case PRAC_CHANGED:
- UninitToxCore();
std::tstring newPath = GetToxProfilePath();
TCHAR oldPath[MAX_PATH];
mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName);
- MoveFileEx(oldPath, newPath.c_str(), MOVEFILE_REPLACE_EXISTING);
+ MoveFileEx(oldPath, newPath.c_str(), MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED);
mir_free(accountName);
accountName = mir_tstrdup(m_tszUserName);
- InitToxCore();
break;
}
}