diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-25 12:40:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-25 12:40:15 +0000 |
commit | 477ffda3aaa80512826a1196ca3819640e0a879c (patch) | |
tree | 5716fb6659b12f0d593f1182bce199fd56563dd4 /protocols/MRA/MraAvatars.cpp | |
parent | 77bad43daad9f8db2cfcc9a91681e3bdb8cf890d (diff) |
- fix for default avatars' names;
- minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@174 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/MraAvatars.cpp')
-rw-r--r-- | protocols/MRA/MraAvatars.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/MRA/MraAvatars.cpp b/protocols/MRA/MraAvatars.cpp index 38cb16c32d..1916f5ab16 100644 --- a/protocols/MRA/MraAvatars.cpp +++ b/protocols/MRA/MraAvatars.cpp @@ -120,10 +120,8 @@ DWORD MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) if (pmraaqAvatarsQueue->hNetlibUser) {
if (bFoldersPresent) {
TCHAR tszPath[ MAX_PATH ];
- LPTSTR lpszPathToAvatarsCache = Utils_ReplaceVarsT( _T("%miranda_avatarcache%"));
- mir_sntprintf( tszPath, SIZEOF(tszPath), _T("%s\\%d"), lpszPathToAvatarsCache, PROTOCOL_NAMEW);
- pmraaqAvatarsQueue->hAvatarsPath = FoldersRegisterCustomPathT(MRA_AVT_SECT_NAME, "AvatarsPath", lpszPathToAvatarsCache);
- mir_free(lpszPathToAvatarsCache);
+ mir_sntprintf( tszPath, SIZEOF(tszPath), _T("%%miranda_avatarcache%%\\%s"), PROTOCOL_NAMEW);
+ pmraaqAvatarsQueue->hAvatarsPath = FoldersRegisterCustomPathT(MRA_AVT_SECT_NAME, "AvatarsPath", tszPath);
}
else pmraaqAvatarsQueue->hAvatarsPath = NULL;
@@ -679,9 +677,8 @@ DWORD MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HANDLE hContact, DWORD d }
else {
if ( DB_GetStaticStringW(NULL, MRA_AVT_SECT_NAME, "DefaultAvatarFileName", lpszCurPath, dwPathSize-5, &dwEMailSize ) == FALSE) {
- memmove(lpszCurPath, MRA_AVT_DEFAULT_AVT_FILENAME, sizeof(MRA_AVT_DEFAULT_AVT_FILENAME));
+ _tcscpy(lpszCurPath, MRA_AVT_DEFAULT_AVT_FILENAME);
lpszCurPath += SIZEOF( MRA_AVT_DEFAULT_AVT_FILENAME )-1;
- *lpszCurPath = 0;
if (pdwPathSizeRet)
*pdwPathSizeRet = lpszCurPath - lpszPath;
|