Redirect process.binding('natives').fs to global fs object

This commit is contained in:
Cheng Zhao 2015-01-31 23:47:47 -08:00
parent 0a393eaa1c
commit afd6f41e08
2 changed files with 6 additions and 1 deletions

View file

@ -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');"