[gnome-boxes] machine: Don't save already saved machines
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] machine: Don't save already saved machines
- Date: Mon, 26 Nov 2012 16:39:07 +0000 (UTC)
commit de8cc2b0420bea69c3c7367c3e735636ec073f2a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sat Nov 24 17:49:43 2012 +0200
machine: Don't save already saved machines
Otherwise we get an error.
https://bugzilla.gnome.org/show_bug.cgi?id=688980
src/machine.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index ecde3b1..45986dd 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -219,6 +219,11 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
}
public async void save () throws GLib.Error {
+ if (state == Machine.MachineState.SAVED) {
+ debug ("Not saving '%s' since its already in saved state.", name);
+ return;
+ }
+
var info = this.info;
this.info = (info != null)? info + "\n" : "";
this.info += _("Saving...");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]