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); })