[gnome-boxes] libvirt-machine-props: Better snapshot naming
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-machine-props: Better snapshot naming
- Date: Mon, 2 Feb 2015 14:35:07 +0000 (UTC)
commit 7aa69b399d119458f74ae04456920664a63017f8
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Feb 2 14:26:30 2015 +0000
libvirt-machine-props: Better snapshot naming
Make use of '%F' specifier of GLib.DateTime.format() when naming
snapshots, mainly to avoid weird spaces we get when using '%e' specifier.
Snapshot names are allowed to contain spaces but spaces in names make it
hard to manipulate snapshots through commandline tools. Our testing
framework's post_scenario clean-up was failing to remove the snapshots
@snapshots_create_an_revert scenario was creating and subsequently also
failing to undefine the associated VM as a result.
src/libvirt-machine-properties.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 4470665..2d4fdcd 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -646,7 +646,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
public async GVir.DomainSnapshot create_snapshot () throws GLib.Error {
var config = new GVirConfig.DomainSnapshot ();
var now = new GLib.DateTime.now_local ();
- config.set_name (now.format ("%y-%m-%e-%H-%M-%S"));
+ config.set_name (now.format ("%F-%H-%M-%S"));
config.set_description (now.format ("%x, %X"));
return yield machine.domain.create_snapshot_async (config, 0, null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]