fixed bug 403, added logging to tcp and email
[org.ibex.core.git] / src / org / ibex / Ibex.java
index a5a2e85..ed3cb9c 100644 (file)
@@ -11,6 +11,7 @@ public final class Ibex extends JS.Cloneable {
 
     // FIXME remove this
     private final JS rr;
+
     public Ibex(Stream rr) { this.rr = bless(rr); }
 
     public JS resolveString(String str, boolean permitAbsolute) throws JSExn {
@@ -169,6 +170,10 @@ public final class Ibex extends JS.Cloneable {
                         else if (url.startsWith("https://")) return new Stream.HTTP(url);
                         else if (url.startsWith("data:")) return new Stream.ByteArray(Base64.decode(url.substring(5)), null);
                         else if (url.startsWith("utf8:")) return new Stream.ByteArray(url.substring(5).getBytes(), null);
+                        else if (url.startsWith("file:")) {
+                            // FIXME
+                            Platform.fileDialog(url.substring(5), false);
+                        }
                         throw new JSExn("invalid resource specifier " + url);
                     }
                     case "thread.sleep": sleep(JS.toInt(a)); return null;