diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-06-17 23:15:57 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-06-17 23:15:57 +0000 |
commit | 65cf85ee6e83594f4de5d6d06012bde070b6c6b1 (patch) | |
tree | 50b3747038b77088ee0bef29f6594a74807397c3 /protocols/Gadu-Gadu/src/gg.cpp | |
parent | 2d26921c87c663de4725963d7da87c6eacd1e3d3 (diff) |
GaduGadu: Cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@14241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/gg.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 0b1aa1d837..1d62a341fd 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -147,38 +147,34 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO void GGPROTO::cleanuplastplugin(DWORD version)
{
- // Store current plugin version
- setDword(GG_PLUGINVERSION, pluginInfo.version);
-
- //1. clean files: %miranda_avatarcache%\GG\*.(null)
- if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 2)){
- debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version);
-
- TCHAR avatarsPath[MAX_PATH];
- mir_sntprintf(avatarsPath, SIZEOF(avatarsPath), _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName);
-
- debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath);
-
- if (avatarsPath != NULL){
- HANDLE hFind = INVALID_HANDLE_VALUE;
- TCHAR spec[MAX_PATH + 10];
- mir_sntprintf(spec, SIZEOF(spec), _T("%s\\*.(null)"), avatarsPath);
- WIN32_FIND_DATA ffd;
- hFind = FindFirstFile(spec, &ffd);
- if (hFind != INVALID_HANDLE_VALUE) {
- do {
- TCHAR filePathT [2*MAX_PATH + 10];
- mir_sntprintf(filePathT, SIZEOF(filePathT), _T("%s\\%s"), avatarsPath, ffd.cFileName);
- if (!_taccess(filePathT, 0)){
- debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT);
- _tremove(filePathT);
- }
- } while (FindNextFile(hFind, &ffd) != 0);
- FindClose(hFind);
- }
- }
- }
-
+ // Store current plugin version
+ setDword(GG_PLUGINVERSION, pluginInfo.version);
+
+ //1. clean files: %miranda_avatarcache%\GG\*.(null)
+ if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 2)){
+ debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version);
+
+ TCHAR avatarsPath[MAX_PATH];
+ mir_sntprintf(avatarsPath, SIZEOF(avatarsPath), _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName);
+
+ debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath);
+
+ TCHAR spec[MAX_PATH + 10];
+ mir_sntprintf(spec, SIZEOF(spec), _T("%s\\*.(null)"), avatarsPath);
+ WIN32_FIND_DATA ffd;
+ HANDLE hFind = FindFirstFile(spec, &ffd);
+ if (hFind != INVALID_HANDLE_VALUE) {
+ do {
+ TCHAR filePathT [2*MAX_PATH + 10];
+ mir_sntprintf(filePathT, SIZEOF(filePathT), _T("%s\\%s"), avatarsPath, ffd.cFileName);
+ if (!_taccess(filePathT, 0)){
+ debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT);
+ _tremove(filePathT);
+ }
+ } while (FindNextFile(hFind, &ffd) != 0);
+ FindClose(hFind);
+ }
+ }
}
//////////////////////////////////////////////////////////
|