diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-08 18:28:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-08 18:28:51 +0000 |
commit | a075d35ca850f06170553d17ca464f0f5feadd97 (patch) | |
tree | 5a86b9dd53d495f6ab987fe72ad2d4f06a85caa2 /protocols/MSN/src | |
parent | 5ba216d4b0d9a98ff6dfe0e4dd3117dcd417ce3a (diff) |
separate Folders handles removed from protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@6405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 25 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.h | 1 |
2 files changed, 2 insertions, 24 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 072cb70951..96c5e236e0 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -139,15 +139,9 @@ void CMsnProto::InitCustomFolders(void) if (InitCstFldRan) return;
TCHAR folder[MAX_PATH];
- TCHAR *tszModuleName = mir_a2t(m_szModuleName);
-
- mir_sntprintf(folder, SIZEOF(folder), _T("%%miranda_avatarcache%%\\%s"), tszModuleName);
- hMSNAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, folder, m_tszUserName);
-
- mir_sntprintf(folder, SIZEOF(folder), _T("%%miranda_avatarcache%%\\%s"), tszModuleName);
+ mir_sntprintf(folder, SIZEOF(folder), _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
hCustomSmileyFolder = FoldersRegisterCustomPathT(LPGEN("Custom Smileys"), m_szModuleName, folder, m_tszUserName);
- mir_free(tszModuleName);
InitCstFldRan = true;
}
@@ -199,22 +193,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) void CMsnProto::MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
{
- size_t tPathLen;
-
- InitCustomFolders();
-
- TCHAR* path = (TCHAR*)alloca(cbLen * sizeof(TCHAR));
- 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\\AvatarCache\\%s"), tmpPath, sztModuleName);
- mir_free(sztModuleName);
- mir_free(tmpPath);
- }
- else {
- _tcscpy(pszDest, path);
- tPathLen = _tcslen(pszDest);
- }
+ size_t tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
if (_taccess(pszDest, 0))
CreateDirectoryTreeT(pszDest);
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index 03daa11483..eef0a1313e 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -184,7 +184,6 @@ struct CMsnProto : public PROTO<CMsnProto> HANDLE hMSNNudge;
HANDLE hPopupError, hPopupHotmail, hPopupNotify;
- HANDLE hMSNAvatarsFolder;
HANDLE hCustomSmileyFolder;
bool InitCstFldRan;
bool isConnectSuccess;
|