[gnome-boxes] wizard: Don't hang on failure to handle a URL



commit 22ff0aa8ebe49211feadd7ff714af74a69fbbc91
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Aug 21 23:03:41 2013 +0300

    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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 903ddbb..d1fdfc3 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -240,8 +240,12 @@ private class Boxes.Wizard: Boxes.UI {
 
             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"));
+            }
         }
     }
 


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