Redirect process.binding('natives').fs to global fs object
This commit is contained in:
parent
0a393eaa1c
commit
afd6f41e08
2 changed files with 6 additions and 1 deletions
|
@ -39,3 +39,8 @@ if process.type is 'browser'
|
|||
# Add support for asar packages.
|
||||
asar = require './asar'
|
||||
asar.wrapFsWithAsar fs
|
||||
|
||||
# Make graceful-fs work with asar.
|
||||
source = process.binding 'natives'
|
||||
source.originalFs = source.fs
|
||||
source.fs = "module.exports = require('fs');"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue