diff options
-rw-r--r-- | protocols/MRA/MraAvatars.cpp | 9 | ||||
-rw-r--r-- | protocols/MRA/MraConstans.h | 2 |
2 files changed, 4 insertions, 7 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;
diff --git a/protocols/MRA/MraConstans.h b/protocols/MRA/MraConstans.h index f045c7d8b5..59fd2382a5 100644 --- a/protocols/MRA/MraConstans.h +++ b/protocols/MRA/MraConstans.h @@ -258,7 +258,7 @@ static const GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[] = #define MRA_AVT_DEFAULT_TIMEOUT_RECV 30
#define MRA_AVT_DEFAULT_USE_KEEPALIVE_CONN TRUE
#define MRA_AVT_DEFAULT_CHK_INTERVAL 60
-#define MRA_AVT_DEFAULT_AVT_FILENAME "_default.jpg"
+#define MRA_AVT_DEFAULT_AVT_FILENAME _T("_default.jpg")
#define MRA_AVT_DEFAULT_RET_ABC_PATH TRUE
#define MRA_DELETE_AVT_ON_CONTACT_DELETE TRUE
#define MRA_AVT_DEFAULT_QE_CHK_INTERVAL 1000 //internal
|