2018-09-22 12:28:50 +00:00
|
|
|
'use strict'
|
|
|
|
|
2018-09-15 17:51:23 +00:00
|
|
|
;(function () { // eslint-disable-line
|
2016-03-25 19:57:17 +00:00
|
|
|
return function (process, require, asarSource) {
|
2018-04-07 15:13:32 +00:00
|
|
|
const source = process.binding('natives')
|
|
|
|
|
|
|
|
// Expose fs module without asar support.
|
|
|
|
source['original-fs'] = source.fs
|
|
|
|
|
2016-05-23 17:28:32 +00:00
|
|
|
// Make asar.js accessible via "require".
|
2018-04-07 15:13:32 +00:00
|
|
|
source.ELECTRON_ASAR = asarSource
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-19 18:25:03 +00:00
|
|
|
// Monkey-patch the fs module.
|
2016-04-08 15:53:58 +00:00
|
|
|
require('ELECTRON_ASAR').wrapFsWithAsar(require('fs'))
|
2016-03-25 19:57:17 +00:00
|
|
|
}
|
|
|
|
})()
|