[gnome-boxes] vm-creator: No post-install setup on forced shutdown



commit 33616014e464cbe7d6b4fe888c7afed7ef4c3ecd
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Sep 24 19:43:29 2015 +0100

    vm-creator: No post-install setup on forced shutdown
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749011

 src/vm-creator.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 9060ef3..c1cfd7c 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -138,6 +138,11 @@ private class Boxes.VMCreator {
             return;
         }
 
+        if (machine.state == Machine.MachineState.FORCE_STOPPED) {
+            debug ("'%s' has forced stopped, no need for post-installation setup on it", machine.name);
+            return;
+        }
+
         increment_num_reboots (machine);
 
         var domain = machine.domain;
@@ -154,8 +159,7 @@ private class Boxes.VMCreator {
             machine.vm_creator = null;
             machine.schedule_autosave ();
         } else {
-            if (VMConfigurator.is_live_config (machine.domain_config) &&
-                machine.state != Machine.MachineState.FORCE_STOPPED) {
+            if (VMConfigurator.is_live_config (machine.domain_config)) {
                 // No installation during live session, so lets delete the VM
                 machine.disconnect (state_changed_id);
                 install_media.clean_up ();


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