From 55640a3ff732d57e38c00a2e827702e96ec42e86 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 21 May 2014 22:31:44 +0800 Subject: [PATCH] win: Make sure shell.showItemInFolder in called on browser side. Fixes #341. --- atom/common/api/lib/clipboard.coffee | 2 +- atom/common/api/lib/shell.coffee | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/common/api/lib/clipboard.coffee b/atom/common/api/lib/clipboard.coffee index bad679bb6eba..99a5754b75c3 100644 --- a/atom/common/api/lib/clipboard.coffee +++ b/atom/common/api/lib/clipboard.coffee @@ -1,5 +1,5 @@ module.exports = - if process.platform is 'linux' + if process.platform is 'linux' and process.__atom_type is 'renderer' # On Linux we could not access clipboard in renderer process. require('remote').process.atomBinding 'clipboard' else diff --git a/atom/common/api/lib/shell.coffee b/atom/common/api/lib/shell.coffee index 5fb935bacd21..74acaf8c7b98 100644 --- a/atom/common/api/lib/shell.coffee +++ b/atom/common/api/lib/shell.coffee @@ -1 +1,4 @@ module.exports = process.atomBinding 'shell' + +if process.platform is 'win32' and process.__atom_type is 'renderer' + module.exports.showItemInFolder = require('remote').process.atomBinding('shell').showItemInFolder