From 3d26dc75537137d829cc388abe0b9fe4b2df0d9d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Mar 2013 13:38:53 +0000 Subject: unicode folders custom names (gotten from szName by default, as usual) git-svn-id: http://svn.miranda-ng.org/main/trunk@3835 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/avatars.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'protocols/AimOscar/src/avatars.cpp') diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index f8017684a7..f54a6b8d41 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -172,7 +172,7 @@ void CAimProto::init_custom_folders(void) TCHAR AvatarsFolder[MAX_PATH]; mir_sntprintf(AvatarsFolder, SIZEOF(AvatarsFolder), _T("%%miranda_avatarcache%%\\%S"), m_szModuleName); - hAvatarsFolder = FoldersRegisterCustomPathT("Avatars", m_szModuleName, AvatarsFolder); + hAvatarsFolder = FoldersRegisterCustomPathT("Avatars", m_szModuleName, AvatarsFolder, m_tszUserName); init_cst_fld_ran = true; } @@ -185,15 +185,8 @@ int CAimProto::get_avatar_filename(HANDLE hContact, TCHAR* pszDest, size_t cbLen TCHAR* path = (TCHAR*)alloca(cbLen * sizeof(TCHAR)); if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, path, (int)cbLen, _T(""))) - { - TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%")); - TCHAR *tszModuleName = mir_a2t(m_szModuleName); - tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s"), tmpPath, tszModuleName); - mir_free(tszModuleName); - mir_free(tmpPath); - } - else - { + tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), (TCHAR*)VARST( _T("%miranda_avatarcache%")), m_szModuleName); + else { _tcscpy(pszDest, path); tPathLen = _tcslen(pszDest); } -- cgit v1.2.3