GNOME Bugzilla – Bug 683558
Make sure 'QEMU Session' exists at startup
Last modified: 2016-03-31 14:01:36 UTC
Without it, Boxes fails to start. At startup, Boxes creates it if ~/.config/gnome-boxes/sources/ does not exist. It's better to directly check for the file we are interested in. Reason for this patch is that while testing other patches, this file went missing...
Created attachment 223735 [details] [review] Make sure 'QEMU Session' exists at startup
Review of attachment 223735 [details] [review]: What happen when it is missing? ideally, I would prefer Boxes not to depend explicitely on it. But it's not really supported yet, so ack..
Created attachment 223738 [details] [review] Make sure 'QEMU Session' exists at startup Without it, Boxes fails to start: (gnome-boxes:19000): Boxes-WARNING **: app.vala:322: No such file or directory error: missing or failing default libvirt connection $ At startup, Boxes creates this file if ~/.config/gnome-boxes/sources/ does not exist. It's better to directly check for the file we are interested in. Reason for this patch is that while testing other patches, this file went missing...
Created attachment 223739 [details] [review] Add missing '\n' to error message
Created attachment 223740 [details] [review] Simplify and robustify Util::keyfile_save The previous implementation was deleting the keyfile and then trying to write to it. This means we can endup with an empty/partial keyfile if an error occurs during the writing. g_file_set_contents will write to a temporary file and then atomatically replace the existing file which is much better. This also makes this function shorter.
Review of attachment 223740 [details] [review]: ack
Review of attachment 223739 [details] [review]: ack