From 0e7bc6b8ec81984a92af708f15d935e084a04aad Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 20 May 2015 13:29:05 +0800 Subject: [PATCH] Make "original-fs" available as built-in module --- atom/common/lib/asar_init.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/common/lib/asar_init.coffee b/atom/common/lib/asar_init.coffee index 49efc902d9af..211c79ee9099 100644 --- a/atom/common/lib/asar_init.coffee +++ b/atom/common/lib/asar_init.coffee @@ -9,10 +9,10 @@ return (process, require, asarSource) -> # Make graceful-fs work with asar. source = process.binding 'natives' - source.originalFs = source.fs - source.fs = """ + source['original-fs'] = source.fs + source['fs'] = """ var src = '(function (exports, require, module, __filename, __dirname) { ' + - process.binding('natives').originalFs + + process.binding('natives')['original-fs'] + ' });'; var vm = require('vm'); var fn = vm.runInThisContext(src, { filename: 'fs.js' });