[gnome-boxes/gnome-3-14] util-app: Always refresh storage pool



commit 30799b60565bc0444e20e05f7c210736eb64fd56
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 2432f20..3537304 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);
 
         return pool;
     }
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index 0417593..0b561e2 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -43,8 +43,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]