summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/Options.cpp')
-rw-r--r--plugins/PluginUpdater/src/Options.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index da0291c4be..c5d0b52def 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -260,17 +260,13 @@ public:
// if user selected update channel without symbols, remove PDBs
if (bNoSymbols) {
- CMStringW wszPath(VARSW(L"%miranda_path%"));
- wszPath.AppendChar('\\');
-
- WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(wszPath + L"*.pdb", &ffd);
- if (hFind != INVALID_HANDLE_VALUE) {
- do {
- DeleteFileW(wszPath + ffd.cFileName);
- } while (FindNextFile(hFind, &ffd) != 0);
+ MFilePath wszPath;
+ wszPath.Format(L"%s\\*.pdb", g_mirandaPath.get());
+
+ for (auto &it : wszPath.search()) {
+ wszPath.Format(L"%s\\%s", g_mirandaPath.get(), it.getPath());
+ DeleteFileW(wszPath);
}
- FindClose(hFind);
}
if (PU::PrepareEscalation())