Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: Shared/PluginClassThread.cpp

Issue 9422198: Exe updater support and bug fixes (Closed)
Patch Set: Created Feb. 28, 2013, 10:37 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Shared/PluginClass.cpp ('k') | Shared/PluginSettings.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Shared/PluginClassThread.cpp
===================================================================
--- a/Shared/PluginClassThread.cpp
+++ b/Shared/PluginClassThread.cpp
@@ -233,10 +233,13 @@
configuration->Invalidate();
#ifdef SUPPORT_FILTER
+ DEBUG_GENERAL("*** before isNewFilterVersion");
+
// Update filters, if needed (5 days * (random() * 0.4 + 0.8))
if (isNewFilterVersion)
{
+ DEBUG_GENERAL("*** before CheckFilterAndDownload");
settings->CheckFilterAndDownload();
settings->MakeRequestForUpdate();
@@ -265,10 +268,19 @@
try
{
CString updateUrl = settings->GetString(SETTING_PLUGIN_UPDATE_URL);
- CString updatePath = CPluginSettings::GetTempPath(INSTALL_MSI_FILE);
-
- // Delete old installer
- ::DeleteFile(CPluginSettings::GetTempPath(INSTALL_MSI_FILE));
+ CString updatePath = L"";
+ if (updateUrl.Find(L".exe") == updateUrl.GetLength() - 4)
+ {
+ updatePath = CPluginSettings::GetTempPath(INSTALL_EXE_FILE);
+ // Delete old installer
+ ::DeleteFile(CPluginSettings::GetTempPath(INSTALL_EXE_FILE));
+ }
+ else
+ {
+ updatePath = CPluginSettings::GetTempPath(INSTALL_MSI_FILE);
+ // Delete old installer
+ ::DeleteFile(CPluginSettings::GetTempPath(INSTALL_MSI_FILE));
+ }
CPluginDownloadDialog dlDlg;
« no previous file with comments | « Shared/PluginClass.cpp ('k') | Shared/PluginSettings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld