summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_profile.cpp')
-rw-r--r--protocols/Tox/src/tox_profile.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index cdfbbe5fb8..9d1d446099 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -7,11 +7,10 @@ std::tstring CToxProto::GetToxProfilePath()
std::tstring CToxProto::GetToxProfilePath(const TCHAR *accountName)
{
- std::tstring profilePath;
- TCHAR defaultPath[MAX_PATH];
- mir_sntprintf(defaultPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName);
- profilePath = defaultPath;
-
+ TCHAR profilePath[MAX_PATH];
+ TCHAR profileRootPath[MAX_PATH];
+ FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, SIZEOF(profileRootPath), VARST(_T("%miranda_userdata%")));
+ mir_sntprintf(profilePath, MAX_PATH, _T("%s\\%s.tox"), profileRootPath, accountName);
return profilePath;
}