From b51da4835dda0eae19a9c012753f8e272e41cfb1 Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Mon, 12 Jul 2021 20:57:06 +0800 Subject: [PATCH] =?UTF-8?q?ref:=20getPath=20=E6=94=B9=E6=88=90=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/preload.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/static/preload.js b/static/preload.js index 1bc6ebe..62c55f0 100644 --- a/static/preload.js +++ b/static/preload.js @@ -105,16 +105,7 @@ window.utools = window.rubick = { }, getPath(name) { - ipcRenderer.send('msg-trigger', { - type: 'getPath', - name, - }); - return new Promise((resolve, reject) => { - ipcRenderer.on(`msg-back-getPath`, (e, result) => { - console.log(result) - result ? resolve(result) : reject(); - }); - }) + return remote.app.getPath(name); }, showNotification(body, clickFeatureCode) {