mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 07:24:13 +01:00
Completion of certain chrome:, resource:, and about: URLs.
This commit is contained in:
@@ -471,7 +471,12 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
*/
|
||||
getFile: function getFile(uri) {
|
||||
if (isString(uri))
|
||||
uri = util.newURI(uri);
|
||||
try {
|
||||
uri = util.newURI(uri);
|
||||
}
|
||||
catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (uri instanceof Ci.nsIFileURL)
|
||||
return File(uri.QueryInterface(Ci.nsIFileURL).file);
|
||||
|
||||
Reference in New Issue
Block a user