summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-13 18:27:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-13 18:27:26 +0000
commitb886dbff1977162ea1a6fa000c8275ecdf561e85 (patch)
treea4053556d4eff9b92bd85f092c1fa51186b40c6a /plugins
parent50d088dcd575d66cf5daa556b91721e8c64593ed (diff)
- trailing W should be skipped as well as the trailing 'w';
- the profile path should be checked, not the default Profiles folder git-svn-id: http://svn.miranda-ng.org/main/trunk@2739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PluginUpdater/src/Scanner.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp
index 8db5b040e0..71bdccdc1b 100644
--- a/plugins/PluginUpdater/src/Scanner.cpp
+++ b/plugins/PluginUpdater/src/Scanner.cpp
@@ -158,11 +158,14 @@ static void ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, cons
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
if ( !_tcscmp(ffd.cFileName, _T(".")) || !_tcscmp(ffd.cFileName, _T("..")))
continue;
- if ( !_tcsicmp(ffd.cFileName, _T("Profiles")))
- continue;
+
+ // we need to skip profile folder
+ TCHAR tszProfilePath[MAX_PATH];
+ CallService(MS_DB_GETPROFILEPATHT, SIZEOF(tszProfilePath), (LPARAM)tszProfilePath);
mir_sntprintf(tszBuf, SIZEOF(tszBuf), _T("%s\\%s"), tszFolder, ffd.cFileName);
- ScanFolder(tszBuf, cbBaseLen, level+1, tszBaseUrl, hashes, UpdateFiles);
+ if (0 != _tcsicmp(tszBuf, tszProfilePath))
+ ScanFolder(tszBuf, cbBaseLen, level+1, tszBaseUrl, hashes, UpdateFiles);
continue;
}
@@ -190,7 +193,7 @@ static void ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, cons
ServListEntry *item = hashes.find(&tmp);
if (item == NULL) {
TCHAR *p = _tcsrchr(tszNewName, '.');
- if (p[-1] != 'w')
+ if (p[-1] != 'w' && p[-1] != 'W')
continue;
int iPos = int(p - key)-1;