diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-12 14:33:09 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-12 14:33:09 +0000 |
commit | 1f9c986d82657f965462d289bf94aa012cf026fc (patch) | |
tree | 94da272d9e75a6339223f95855aa80400e046b29 | |
parent | 0ecadfc45326fce5fc4ba28b27a0a7ad484e5b84 (diff) |
fix for updating old dlls with trailing W in file name
git-svn-id: http://svn.miranda-ng.org/main/trunk@1889 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/PluginUpdater/src/Scanner.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp index 498ea73f90..a88d934d61 100644 --- a/plugins/PluginUpdater/src/Scanner.cpp +++ b/plugins/PluginUpdater/src/Scanner.cpp @@ -128,8 +128,9 @@ static void ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, cons // this file is not marked for deletion
if (tszNewName[0]) {
// parse a relative name and extract a key for hashtable lookup
- TCHAR *p = _tcschr(tszNewName, '\\');
- _tcscpy(key, (p != NULL) ? p+1 : tszNewName);
+ TCHAR *ptszName = _tcschr(tszNewName, '\\');
+ ptszName = (ptszName != NULL) ? ptszName+1 : tszNewName;
+ _tcscpy(key, ptszName);
_tcslwr(key);
ServListEntry tmp = {NULL, key};
ServListEntry *item = hashes.find(&tmp);
@@ -143,7 +144,7 @@ static void ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, cons if ((item = hashes.find(&tmp)) == NULL)
continue;
- strdel(tszNewName+iPos, 1);
+ strdel(ptszName+iPos, 1);
}
PrepareFileName(key, SIZEOF(key), NULL, item->m_name);
|