From df2cf923e12e03fe4f2f9834440c8c704398cb76 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Fri, 11 May 2012 15:52:44 +0200 Subject: [PATCH] MainBundle path has no '/' at the end when running in CommonJS. This will make relative paths fail. For example if OBJJ_INCLUDE_PATHS has the path "../../MyLibrary". MyLibrary will not be found when the path is joined with mainBundlePath without an ending '/'. This is working when running in Browser. --- Objective-J/Bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objective-J/Bootstrap.js b/Objective-J/Bootstrap.js index 3ed56821d..3ea3fe515 100644 --- a/Objective-J/Bootstrap.js +++ b/Objective-J/Bootstrap.js @@ -22,7 +22,7 @@ #ifdef COMMONJS -var mainBundleURL = new CFURL("file:" + require("file").cwd()); +var mainBundleURL = new CFURL("file:" + require("file").cwd()).asDirectoryPathURL(); #elif defined(BROWSER) // This is automatic when importing, but we'd like these important URLs to // be taken into consideration in the cache as well.