summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-13 20:41:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-13 20:41:31 +0000
commit14c74e94a147cf0bd0b5337e3b3fffabc0c34221 (patch)
treeca712d1f6fa2980650a9c38802ba6d4697082f97 /protocols/Gadu-Gadu/src
parented29ab352693783c3cc66cd2d102bb4c3a4ad02d (diff)
fix for GG avatar file names
git-svn-id: http://svn.miranda-ng.org/main/trunk@4646 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index 674a2e37ed..1a89631748 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -25,16 +25,16 @@
//////////////////////////////////////////////////////////
// Avatars support
+
void GGPROTO::getAvatarFilename(HANDLE hContact, TCHAR *pszDest, int cbLen)
{
int tPathLen;
TCHAR *path = (TCHAR*)alloca(cbLen * sizeof(TCHAR));
TCHAR *avatartype = NULL;
- if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, path, cbLen, _T(""))) {
- mir_ptr<TCHAR> tmpPath( Utils_ReplaceVarsT( _T("%miranda_avatarcache%")));
- tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s"), (TCHAR*)tmpPath, m_tszUserName);
- } else {
+ if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, path, cbLen, _T("")))
+ tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
+ else {
_tcscpy(pszDest, path);
tPathLen = (int)_tcslen(pszDest);
}
@@ -65,9 +65,8 @@ void GGPROTO::getAvatarFilename(HANDLE hContact, TCHAR *pszDest, int cbLen)
mir_free(avatarHashT);
db_free(&dbv);
}
- } else {
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s avatar.%s"), m_tszUserName, avatartype);
}
+ else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%S avatar.%s"), m_szModuleName, avatartype);
}
void GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)