From b886dbff1977162ea1a6fa000c8275ecdf561e85 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 13 Dec 2012 18:27:26 +0000 Subject: - 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 --- plugins/PluginUpdater/src/Scanner.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/PluginUpdater') 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; -- cgit v1.2.3