Skip to content

Commit

Permalink
PathUtils not available in parent process
Browse files Browse the repository at this point in the history
this allows us to revert to setting minimalVersion to 68; compat shims
will be reinstated in the next commit.

https://searchfox.org/mozilla-central/rev/346a76bee7dc0e60f8f2ae9690785e818bd05cec/toolkit/modules/tests/xpcshell/test_BrowserUtils_urlFormatting.js#131
  • Loading branch information
girst committed Jun 5, 2023
1 parent 7e321a9 commit 12c6e62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions extension/lib/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ messageManager = require('./message-manager')
utils = require('./utils')
prefs = require('./prefs')

{FileUtils} = ChromeUtils.import('resource://gre/modules/FileUtils.jsm')

load = (vimfx, options = null, callback = ->) ->
configDir = vimfx.options.config_file_directory

Expand Down Expand Up @@ -44,11 +46,12 @@ checkSandbox = (expandedDir) ->

loadFile = (dir, file, scope) ->
expandedDir = utils.expandPath(dir)
uri = PathUtils.toFileURI(PathUtils.join(expandedDir, file))
expandedFile = expandedDir + '/' + file
uri = Services.io.newFileURI(new FileUtils.File(expandedFile)).spec
try
Services.scriptloader.loadSubScriptWithOptions(uri, {
target: Object.assign({
__dirname: PathUtils.toFileURI(expandedDir),
__dirname: Services.io.newFileURI(new FileUtils.File(expandedDir)).spec,
Services: Services
}, scope)
charset: 'UTF-8'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "VimFx",
"version": "0.26.0",
"firefoxVersions": {
"min": "84.0",
"min": "68.0",
"max": "*"
},
"license": "MIT",
Expand Down

0 comments on commit 12c6e62

Please sign in to comment.