summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/Scanner.cpp')
-rw-r--r--plugins/PluginUpdater/src/Scanner.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp
index c3659a6275..47dd5b3b9a 100644
--- a/plugins/PluginUpdater/src/Scanner.cpp
+++ b/plugins/PluginUpdater/src/Scanner.cpp
@@ -506,12 +506,10 @@ static void GetList(void *)
TCHAR tszRelFileName[MAX_PATH];
_tcscpy(tszRelFileName, hash.m_name);
- tp = _tcschr(tszRelFileName, L'.'); *tp = 0;
- tp = _tcschr(tszRelFileName, L'\\');
- tp = (p) ? tp+1 : tszRelFileName;
+ tp = _tcsrchr(tszRelFileName, L'.'); if (tp) *tp = 0;
+ tp = _tcschr(tszRelFileName, L'\\'); if (tp) tp++; else tp = tszRelFileName;
_tcslwr(tp);
-
mir_sntprintf(FileInfo->File.tszDiskPath, SIZEOF(FileInfo->File.tszDiskPath), _T("%s\\Temp\\%s.zip"), tszRoot, tszFileName);
mir_sntprintf(FileInfo->File.tszDownloadURL, SIZEOF(FileInfo->File.tszDownloadURL), _T("%s/%s.zip"), tszBaseUrl, tszRelFileName);
for (tp = _tcschr(FileInfo->File.tszDownloadURL, '\\'); tp != 0; tp = _tcschr(tp, '\\'))