Skip to content

Instantly share code, notes, and snippets.

@harthur
Created September 1, 2010 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harthur/561274 to your computer and use it in GitHub Desktop.
Save harthur/561274 to your computer and use it in GitHub Desktop.
diff --git a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js b/mozmill/mozmill/extension/resource/modules/securable-module.js
index 57173a9..794c3e2 100644
--- a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js
+++ b/mozmill/mozmill/extension/resource/modules/securable-module.js
@@ -204,7 +204,6 @@
};
return chrome;
}
-
var path = self.fs.resolveModule(rootDir, module);
if (!path)
throw new Error('Module "' + module + '" not found');
@@ -310,21 +309,18 @@
path = path + ".js";
var baseURI;
- if (!base || path.charAt(0) != '.')
+ if (!base)
baseURI = this._rootURI;
else
baseURI = ios.newURI(base, null, null);
var newURI = ios.newURI(path, null, baseURI);
- if (newURI.spec.indexOf(this._rootURIDir) == 0) {
- var channel = ios.newChannelFromURI(newURI);
- try {
- channel.open().close();
- } catch (e if e.result == Cr.NS_ERROR_FILE_NOT_FOUND) {
- return null;
- }
- return newURI.spec;
+ var channel = ios.newChannelFromURI(newURI);
+ try {
+ channel.open().close();
+ } catch (e if e.result == Cr.NS_ERROR_FILE_NOT_FOUND) {
+ return null;
}
- return null;
+ return newURI.spec;
},
getFile: function getFile(path) {
var channel = ios.newChannel(path, null, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment