[gnome-boxes] Fix VM creation if userdatadir is missing



commit f5bfb357050b222d210229a661955b3a3110415a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Nov 16 23:28:17 2013 -0600

    Fix VM creation if userdatadir is missing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696360

 src/vm-creator.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 5347d62..bd19ee8 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -201,6 +201,11 @@ private class Boxes.VMCreator {
             yield pool.build_async (0, null);
             yield pool.start_async (0, null);
             yield pool.refresh_async (null);
+        } else if (pool.get_info ().state == StoragePoolState.INACTIVE) {
+            // Ensure pool directory exists in case user deleted it after pool creation
+            DirUtils.create_with_parents (GLib.Path.build_filename (get_user_pkgdata (), "images", null), 
0775);
+            yield pool.start_async (0, null);
+            yield pool.refresh_async (null);
         }
 
         return pool;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]