summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_account.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r--protocols/Tox/src/tox_account.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp
index 6a40a14526..a733d5f480 100644
--- a/protocols/Tox/src/tox_account.cpp
+++ b/protocols/Tox/src/tox_account.cpp
@@ -22,17 +22,12 @@ int CToxProto::OnAccountLoaded(WPARAM, LPARAM)
void CToxProto::InitToxCore()
{
std::tstring profilePath = GetToxProfilePath();
- if (!IsFileExists(profilePath))
- {
- return;
- }
-
hProfile = CreateFile(
profilePath.c_str(),
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
- OPEN_EXISTING,
+ OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
@@ -49,7 +44,7 @@ void CToxProto::InitToxCore()
{
if (nlus.proxyType == PROXYTYPE_SOCKS4 || nlus.proxyType == PROXYTYPE_SOCKS5)
{
- debugLogA("CToxProto::InitToxCore: Setting socks user proxy config");
+ debugLogA("CToxProto::InitToxCore: setting socks user proxy config");
options.proxy_enabled = 1;
strcpy(&options.proxy_address[0], nlus.szProxyServer);
options.proxy_port = nlus.wProxyPort;
@@ -97,12 +92,6 @@ void CToxProto::InitToxCore()
void CToxProto::UninitToxCore()
{
- std::tstring profilePath = GetToxProfilePath();
- if (!IsFileExists(profilePath))
- {
- return;
- }
-
SaveToxProfile();
tox_kill(tox);
CloseHandle(hProfile);