[gnome-boxes] installer: Only use driver if all files are available
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] installer: Only use driver if all files are available
- Date: Mon, 10 Dec 2012 17:29:20 +0000 (UTC)
commit 37a569105ae1d1646af54d236c08e733c65bbf7e
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Dec 10 18:32:51 2012 +0200
installer: Only use driver if all files are available
Currently if download of one of the driver files fails, we still try to
use the driver. Lets not do that!
https://bugzilla.gnome.org/show_bug.cgi?id=689987
src/unattended-installer.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 2a884ce..6fb858c 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -613,6 +613,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
Cancellable? cancellable) throws GLib.Error {
var downloader = Downloader.get_instance ();
+ var driver_files = new GLib.List<UnattendedFile> ();
var location = driver.get_location ();
foreach (var filename in driver.get_files ()) {
var file_uri = location + "/" + filename;
@@ -621,9 +622,13 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
file = yield downloader.download (file, cached_path);
- add_unattended_file (new UnattendedRawFile (this, cached_path, filename));
+ driver_files.append (new UnattendedRawFile (this, cached_path, filename));
}
+ // We don't do this in above loop to ensure we have all the driver files
+ foreach (var driver_file in driver_files)
+ add_unattended_file (driver_file);
+
foreach (var d in driver.get_devices ().get_elements ()) {
var device = d as Device;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]