From f95061778520b8519027427a2392ccbf81cb4751 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Apr 2020 09:02:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=BC=80=E8=BF=9B=E7=A8=8B=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E5=A4=8D=E5=88=B6=E8=BF=9B=E7=A8=8B=E8=B7=AF?= =?UTF-8?q?=E5=8A=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preload.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/preload.js b/preload.js index 7d55efe..d59c242 100644 --- a/preload.js +++ b/preload.js @@ -4,12 +4,16 @@ const { exec, execFile, execSync } = require("child_process") const path = require("path") const fs = require('fs'); const process = require('process'); +const { clipboard, shell } = require('electron') // const jschardet = require('jschardet'); isDev = /unsafe-\w+\.asar/.test(__dirname) ? false : true basename = path.basename +copy = clipboard.writeText +open = shell.showItemInFolder + GetBinPath = ExeFile => { if (isDev) { return path.join(__dirname, 'bin', ExeFile) @@ -63,7 +67,7 @@ taskkill = (pid, restart) => } if(restart){ utools.showNotification('重启进程成功!') - exec(restart); + exec(`"${restart}"`); } reslove(true); })