diff options
Diffstat (limited to 'protocols/Tox/src/tox_profile.cpp')
-rw-r--r-- | protocols/Tox/src/tox_profile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 89f40d75e7..aea5492686 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -32,6 +32,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) FILE *profile = _tfopen(profilePath.c_str(), _T("rb"));
if (profile == NULL)
{
+ ShowNotification(TranslateT("Unable to open tox profile"), MB_ICONERROR);
debugLogA(__FUNCTION__": failed to open tox profile");
return false;
}
@@ -49,6 +50,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) if (fread((char*)data, sizeof(char), size, profile) != size)
{
fclose(profile);
+ ShowNotification(TranslateT("Unable to read tox profile"), MB_ICONERROR);
debugLogA(__FUNCTION__": failed to read tox profile");
mir_free(data);
return false;
@@ -71,7 +73,8 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) TOX_ERR_DECRYPTION coreDecryptError;
if (!tox_pass_decrypt(data, size, (uint8_t*)password, mir_strlen(password), encryptedData, &coreDecryptError))
{
- debugLogA(__FUNCTION__": failed to load tox profile (%d)", coreDecryptError);
+ ShowNotification(TranslateT("Unable to decrypt tox profile"), MB_ICONERROR);
+ debugLogA(__FUNCTION__": failed to decrypt tox profile (%d)", coreDecryptError);
mir_free(data);
return false;
}
@@ -92,6 +95,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) if (initError != TOX_ERR_NEW_OK)
{
debugLogA(__FUNCTION__": failed to load tox profile (%d)", initError);
+ ShowNotification(ToxErrorToString(initError), TranslateT("Unable to load tox profile"), MB_ICONERROR);
mir_free(data);
return false;
}
|