electron/atom/common/api/lib/shell.coffee
Cheng Zhao f399f50e9e Fix calling showItemInFolder in renderer
The remote method always assumes the existence of the remote object but
doesn't keep a reference to it, so if we only keep the reference of a
remote method we will get into troubles once the remote object is
garbage collected.

We should probably fix this in remote module, but since most things are
already working quite good, I'm using the work-around for now.

Fix #3139.
2015-10-26 16:48:27 +08:00

5 lines
215 B
CoffeeScript

module.exports = process.atomBinding 'shell'
if process.platform is 'win32' and process.type is 'renderer'
module.exports.showItemInFolder = (item) ->
require('remote').require('shell').showItemInFolder item