summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/PluginUpdater/src/Options.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 8d5c3db7c7..337f1b2dd7 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -289,11 +289,13 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
mir_forkthread(InitTimer, (void*)1);
+ bool bNoSymbols = false;
if (IsDlgButtonChecked(hwndDlg, IDC_STABLE)) {
db_set_b(NULL, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
if (!opts.bChangePlatform)
opts.bForceRedownload = 0;
db_unset(NULL, MODULENAME, DB_SETTING_REDOWNLOAD);
+ bNoSymbols = true;
}
else if (IsDlgButtonChecked(hwndDlg, IDC_STABLE_SYMBOLS)) {
// Only set ForceRedownload if the previous UpdateMode was different
@@ -308,6 +310,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
if (!opts.bChangePlatform)
opts.bForceRedownload = 0;
db_unset(NULL, MODULENAME, DB_SETTING_REDOWNLOAD);
+ bNoSymbols = true;
}
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK_SYMBOLS)) {
// Only set ForceRedownload if the previous UpdateMode was different
@@ -332,6 +335,22 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
}
else db_set_b(NULL, MODULENAME, DB_SETTING_CHANGEPLATFORM, opts.bChangePlatform = 0);
+ // 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);
+ }
+ FindClose(hFind);
+ }
+
// if user tried to change the channel, run the update dialog immediately
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM)))
CallService(MS_PU_CHECKUPDATES, 0, 0);