From e0d4d2c2d2082f272f0492934a598d12280986bd Mon Sep 17 00:00:00 2001
From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
Date: Wed, 21 Aug 2013 23:03:41 +0300
Subject: [PATCH] wizard: Don't hang on failure to handle a URL
Boxes would just hang in wizard's preparation stage if you pass a path
to a file on a locally mounted remote share (e.g SMB). Although the real
solution is to be able to handle those, we should have this in place
just in case this codepath is walked for some other reason.
https://bugzilla.gnome.org/show_bug.cgi?id=688798
---
src/wizard.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/wizard.vala b/src/wizard.vala
index 14729f2..d007302 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -240,8 +240,12 @@ private void prepare_for_location (string location, bool probing = false) throws
if (uncertain)
prepare_for_uri (uri);
- else
- debug ("FIXME: %s".printf (mimetype));
+ else {
+ debug ("Can't handle remote location '%s' (mime type: '%s')",
+ uri,
+ ContentType.get_mime_type (mimetype));
+ throw new Boxes.Error.INVALID (_("Invalid URI"));
+ }
}
}
--
2.1.0