bugfixes
[org.ibex.mail.git] / src / org / ibex / mail / target / Script.java
index 206fdd0..c742cc4 100644 (file)
@@ -55,14 +55,17 @@ public class Script extends Target {
     // FIXME: this should extend org.ibex.core.Ibex
     public static class ScriptEnv extends JS {
 
-        private static PropertyFile prefs;
+        private static PropertyFile prefs = null;
+            /*
         static {
             try {
+                // FIXME
                 prefs = new PropertyFile(new File("/etc/org.ibex.mail.properties"));
             } catch (IOException e) {
                 Log.error(ScriptEnv.class, e);
             }
         }
+            */
 
         /** lets us put multi-level get/put/call keys all in the same method */
         private class Sub extends JS {
@@ -92,7 +95,9 @@ public class Script extends Target {
             if (name.equals("mail")) { return getSub("mail"); }
             if (name.equals("mail.my")) { return getSub("mail.my"); }
             if (name.equals("mail.my.prefs")) { return prefs; }
-            //if (name.equals("mail.my.mailbox")) { return Mailbox.getForUser("megacz"); }
+            if (name.equals("mail.my.mailbox")) {
+               return FileBasedMailbox.getFileBasedMailbox(Mailbox.STORAGE_ROOT, true).slash("user", true).slash("megacz", true).slash("newmail", true);
+           }
             return super.get(name);
         }