summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Events.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-08 14:18:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-08 14:18:12 +0000
commitb073e215612eda97d9182bc951bf01058585b910 (patch)
treeb738b31496c27223e2343c1d36a5434f54ef29a9 /plugins/PluginUpdater/src/Events.cpp
parent7098878c15e41955369620fe2844a133aef4b4ef (diff)
- temp folder auto-cleanup;
- manual cleanup removed git-svn-id: http://svn.miranda-ng.org/main/trunk@1403 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Events.cpp')
-rw-r--r--plugins/PluginUpdater/src/Events.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index 84ea06be08..295b9288cb 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -25,6 +25,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
opts.bSilent = true;
+ int iRestartCount = DBGetContactSettingByte(NULL, MODULEA, "RestartCount", 2);
+ if (iRestartCount > 0)
+ DBWriteContactSettingByte(NULL, MODULEA, "RestartCount", iRestartCount-1);
+ else
+ EmptyFolder(0, TRUE); // silently
+
if (AllowUpdateOnStartup())
DoCheck(opts.bUpdateOnStartup);