[gnome-boxes] vm-creator: Correctly handle forced shutdowns



commit 6551a337259327766f213102e67c66ad67d86711
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Oct 10 00:53:00 2012 +0300

    vm-creator: Correctly handle forced shutdowns
    
    Don't do any post-installation checks on a machine if its forced to
    shutdown. This is not only the right thing to do but it also solves the
    issue of live VMs getting automatically deleted on forced shutdown.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685846

 src/vm-creator.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 92ec01e..a3c6e53 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -96,6 +96,9 @@ private class Boxes.VMCreator {
             return;
         }
 
+        if (machine.state == Machine.MachineState.FORCE_STOPPED)
+            return;
+
         if (machine.state == Machine.MachineState.SAVED) {
             debug ("'%s' has saved state, no need for post-installation setup on it", machine.name);
             // This means the domain was just saved and thefore this is not yet the time to take any post-install



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