summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-08 18:28:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-08 18:28:51 +0000
commita075d35ca850f06170553d17ca464f0f5feadd97 (patch)
tree5a86b9dd53d495f6ab987fe72ad2d4f06a85caa2 /plugins
parent5ba216d4b0d9a98ff6dfe0e4dd3117dcd417ce3a (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 'plugins')
-rw-r--r--plugins/FlashAvatars/src/cflash.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp
index 87961b5c0b..e6be9eea82 100644
--- a/plugins/FlashAvatars/src/cflash.cpp
+++ b/plugins/FlashAvatars/src/cflash.cpp
@@ -169,12 +169,10 @@ static void __cdecl loadFlash_Thread(void *p) {
fgd.szPathT = path;
fgd.flags = FF_TCHAR;
if (!hAvatarsFolder || CallService(MS_FOLDERS_GET_PATH, (WPARAM)hAvatarsFolder, (LPARAM)&fgd)) {
- if(ServiceExists(MS_UTILS_REPLACEVARS)) {
- TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%"));
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s"), tmpPath, _T("Flash"));
- mir_free(tmpPath);
- }
- else PathToAbsoluteT( _T("Flash"), path);
+ if(ServiceExists(MS_UTILS_REPLACEVARS))
+ mir_sntprintf(path, MAX_PATH, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), _T("Flash"));
+ else
+ PathToAbsoluteT( _T("Flash"), path);
}
else {
if(_tcslen(path) && path[_tcslen(path)-1]=='\\')
@@ -592,15 +590,7 @@ static int systemModulesLoaded(WPARAM /*wParam*/, LPARAM /*lParam*/)
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user);
TCHAR path[MAX_PATH];
- if (ServiceExists(MS_UTILS_REPLACEVARS))
- { // default Avatar Cache path for MIM 0.8+
- TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%"));
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s\\"), tmpPath, _T("Flash"));
- mir_free(tmpPath);
- }
- // default for older Mirandas
- else PathToAbsoluteT( _T("Flash\\"), path);
-
+ mir_sntprintf(path, MAX_PATH, _T("%s\\%s\\"), VARST(_T("%miranda_avatarcache%")), _T("Flash"));
hAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("Flash Avatars"), path);
return 0;
}