[gnome-boxes] vm-creator: Ensure images dir even if pool is active
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-creator: Ensure images dir even if pool is active
- Date: Wed, 15 Jul 2015 16:47:54 +0000 (UTC)
commit 81075d34174dd862d13886c27d7eccc9fe10c050
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 15 16:28:47 2015 +0100
vm-creator: Ensure images dir even if pool is active
Seems it's possible for storage pool to remain active even if underlying
directory is removed. Let's always ensure images directory exists.
https://bugzilla.gnome.org/show_bug.cgi?id=752417
src/vm-creator.vala | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 5a0e42d..68f25be 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -196,14 +196,14 @@ private class Boxes.VMCreator {
var config = VMConfigurator.get_pool_config ();
pool = connection.create_storage_pool (config, 0);
yield pool.build_async (0, null);
- yield pool.start_async (0, null);
- yield pool.refresh_async (null);
debug ("Created storage pool.");
- } else if (pool.get_info ().state == StoragePoolState.INACTIVE) {
- // Ensure pool directory exists in case user deleted it after pool creation
- var pool_path = get_user_pkgdata ("images");
- ensure_directory (pool_path);
+ }
+
+ // Ensure pool directory exists in case user deleted it after pool creation
+ var pool_path = get_user_pkgdata ("images");
+ ensure_directory (pool_path);
+ if (pool.get_info ().state == StoragePoolState.INACTIVE) {
yield pool.start_async (0, null);
yield pool.refresh_async (null);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]