[gnome-boxes] media-manager: More reliable check for media type
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] media-manager: More reliable check for media type
- Date: Sat, 21 Dec 2013 14:21:09 +0000 (UTC)
commit daaeec8358f0ae23a33ae1bb1f53c863a315d131
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sat Dec 21 13:58:04 2013 +0000
media-manager: More reliable check for media type
Instead of checking for mime-types on file to see if its an
installer/live media, we now rely on the check for installed media based
on file extension.
This fixes the regression from commit d231c27 which completely broke
handling of ISO9660 devices (loop-mounted ISOs and hardware).
https://bugzilla.gnome.org/show_bug.cgi?id=720801
src/media-manager.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/media-manager.vala b/src/media-manager.vala
index 1dfbf53..52f7990 100644
--- a/src/media-manager.vala
+++ b/src/media-manager.vala
@@ -27,10 +27,11 @@ private class Boxes.MediaManager : Object {
Cancellable? cancellable = null) throws
GLib.Error {
InstallerMedia media;
- if (is_mime_type (path, "application/x-cd-image"))
- media = yield new InstallerMedia.for_path (path, this, cancellable);
- else
+ try {
media = yield new InstalledMedia.guess_os (path, this);
+ } catch (IOError.NOT_SUPPORTED e) {
+ media = yield new InstallerMedia.for_path (path, this, cancellable);
+ }
return create_installer_media_from_media (media);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]