diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-21 19:09:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-21 19:09:01 +0000 |
commit | 9f8f69354030860c05e3c89b8050723a135b74f4 (patch) | |
tree | 9c383b6d936cc4d949fa416c032cbe2e91f16332 | |
parent | 28d2449a2207fa8c3f959c8037afe6e869300101 (diff) |
fix for msn avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@6168 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 94ee971d1f..072cb70951 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -204,11 +204,10 @@ void CMsnProto::MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cb InitCustomFolders();
TCHAR* path = (TCHAR*)alloca(cbLen * sizeof(TCHAR));
- if (hMSNAvatarsFolder == NULL || FoldersGetCustomPathT(hMSNAvatarsFolder, path, (int)cbLen, _T("")))
- {
+ if (hMSNAvatarsFolder == NULL || FoldersGetCustomPathT(hMSNAvatarsFolder, path, (int)cbLen, _T(""))) {
TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
TCHAR *sztModuleName = mir_a2t(m_szModuleName);
- tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\Avatars\\%s"), tmpPath, sztModuleName);
+ tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\AvatarCache\\%s"), tmpPath, sztModuleName);
mir_free(sztModuleName);
mir_free(tmpPath);
}
@@ -265,7 +264,10 @@ void CMsnProto::MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cb if (!found) pszDest[0] = 0;
}
- else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, ext);
+ else {
+ tPathLen--;
+ mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, ext);
+ }
}
int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen)
|