[gnome-boxes] util-app: Always refresh storage pool
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] util-app: Always refresh storage pool
- Date: Wed, 15 Jul 2015 16:48:09 +0000 (UTC)
commit aa23403b3b9b358ab4faa0b716ebdf98e3b10382
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 15 17:13:30 2015 +0100
util-app: Always refresh storage pool
Let's make refreshing of storage pool an unconditional activity of
ensure_storage_pool() utility function.
https://bugzilla.gnome.org/show_bug.cgi?id=752417
src/util-app.vala | 5 ++---
src/vm-importer.vala | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/util-app.vala b/src/util-app.vala
index 0366fa8..ff530bb 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -116,10 +116,9 @@ namespace Boxes {
var pool_path = get_user_pkgdata ("images");
ensure_directory (pool_path);
- if (pool.get_info ().state == GVir.StoragePoolState.INACTIVE) {
+ if (pool.get_info ().state == GVir.StoragePoolState.INACTIVE)
yield pool.start_async (0, null);
- yield pool.refresh_async (null);
- }
+ yield pool.refresh_async (null);
pool.set_autostart (true);
return pool;
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index e1514c7..f8e4901 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -37,8 +37,7 @@ private class Boxes.VMImporter : Boxes.VMCreator {
yield source_media.copy (destination_path);
// Without refreshing the pool, libvirt will not know of changes to volume we just made
- var pool = yield Boxes.ensure_storage_pool (connection);
- yield pool.refresh_async (null);
+ yield Boxes.ensure_storage_pool (connection);
} catch (GLib.Error error) {
warning ("Failed to import box '%s' from file '%s': %s",
machine.name,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]