[gnome-boxes] wizard: don't accept empty string



commit ab07fe1e860a552ace38f5119bf63b374eb3c6ac
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Wed Jan 4 18:53:01 2012 +0100

    wizard: don't accept empty string
    
    Wizard shouldn't accept empty string, and
    wait until something is typed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667363

 src/wizard.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index fc440bb..e20574d 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -150,6 +150,9 @@ private class Boxes.Wizard: Boxes.UI {
     }
 
     private void prepare_for_location (string location) throws GLib.Error {
+        if (location == "")
+            throw new Boxes.Error.INVALID ("empty location");
+
         var file = File.new_for_commandline_arg (location);
 
         if (file.is_native ())



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