mirror of
https://github.com/electron/electron.git
synced 2026-01-22 13:58:01 -05:00
Add original-fs module
This commit is contained in:
1
atom.gyp
1
atom.gyp
@@ -38,6 +38,7 @@
|
||||
'atom/common/api/lib/clipboard.coffee',
|
||||
'atom/common/api/lib/crash-reporter.coffee',
|
||||
'atom/common/api/lib/id-weak-map.coffee',
|
||||
'atom/common/api/lib/original-fs.coffee',
|
||||
'atom/common/api/lib/screen.coffee',
|
||||
'atom/common/api/lib/shell.coffee',
|
||||
'atom/common/lib/init.coffee',
|
||||
|
||||
6
atom/common/api/lib/original-fs.coffee
Normal file
6
atom/common/api/lib/original-fs.coffee
Normal file
@@ -0,0 +1,6 @@
|
||||
fs = require 'fs'
|
||||
|
||||
copied = {}
|
||||
copied[k] = v for k, v of fs
|
||||
|
||||
module.exports = copied
|
||||
@@ -35,5 +35,8 @@ if process.type is 'browser'
|
||||
global.setTimeout = wrapWithActivateUvLoop timers.setTimeout
|
||||
global.setInterval = wrapWithActivateUvLoop timers.setInterval
|
||||
|
||||
# Initialize the "original-fs" module before asar support is loaded.
|
||||
require 'original-fs'
|
||||
|
||||
# Add support for asar packages.
|
||||
require './asar'
|
||||
|
||||
Reference in New Issue
Block a user