Fix bug 462393 - Sunbird tinderboxen busted [Error: mozilla/dist/bin/js: Not a directory]. r=philipp
authorDaniel Boelzle <daniel.boelzle@sun.com>
Wed, 05 Nov 2008 10:27:44 +0100
changeset 1012 00698db7a05201035a598f495faadae83f8d519b
parent 1011 cd917021e5d0600ff773cc254538853c4dcf2e4d
child 1013 c73d43a0de7cff411017776d28bab1eeffb2b9d5
push id751
push usermozilla@kewis.ch
push dateWed, 05 Nov 2008 09:28:12 +0000
treeherdercomm-central@00698db7a052 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs462393
Fix bug 462393 - Sunbird tinderboxen busted [Error: mozilla/dist/bin/js: Not a directory]. r=philipp
calendar/base/src/calUtils.jsm
--- a/calendar/base/src/calUtils.jsm
+++ b/calendar/base/src/calUtils.jsm
@@ -55,19 +55,19 @@ let cal = {
      */
     loadScripts: function cal_loadScripts(scriptNames, scope, baseDir) {
         let scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
                                      .createInstance(Components.interfaces.mozIJSSubScriptLoader);
         let ioService = cal.getIOService();
 
         if (!baseDir) {
             baseDir = __LOCATION__.parent.parent;
+            baseDir = baseDir.clone();
+            baseDir.append("calendar-js");
         }
-        baseDir = baseDir.clone();
-        baseDir.append("calendar-js");
 
         for each (let script in scriptNames) {
             let scriptFile = baseDir.clone();
             scriptFile.append(script);
             try {
                 scriptLoader.loadSubScript(ioService.newFileURI(scriptFile).spec, scope);
             } catch (exc) {
                 Components.utils.reportError(exc);