[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3390: Make doubly sure that the cancel() method has no effect on p (vidalia/branches/auto-updates/src/vidalia)



Author: edmanm
Date: 2008-12-13 01:14:11 -0500 (Sat, 13 Dec 2008)
New Revision: 3390

Modified:
   vidalia/branches/auto-updates/src/vidalia/updateprocess.cpp
Log:
Make doubly sure that the cancel() method has no effect on package
installation. (Aborting in the middle of that is probably bad news bears.)


Modified: vidalia/branches/auto-updates/src/vidalia/updateprocess.cpp
===================================================================
--- vidalia/branches/auto-updates/src/vidalia/updateprocess.cpp	2008-12-13 06:11:43 UTC (rev 3389)
+++ vidalia/branches/auto-updates/src/vidalia/updateprocess.cpp	2008-12-13 06:14:11 UTC (rev 3390)
@@ -75,11 +75,13 @@
 void
 UpdateProcess::cancel()
 {
+  if (_currentCommand == CheckForUpdates) {
 #if defined(Q_OS_WIN32)
-  kill();
+    kill();
 #else
-  terminate();
+    terminate();
 #endif
+  }
 }
 
 void