From 66a6262aec5d370eb0be162b4a6adb677bd4b7bf Mon Sep 17 00:00:00 2001 From: starknt <1431880400@qq.com> Date: Fri, 22 Nov 2024 03:34:22 +0800 Subject: [PATCH] fix: path err --- packages/gui/src/view/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gui/src/view/api.js b/packages/gui/src/view/api.js index 07df21e..c4f9a8c 100644 --- a/packages/gui/src/view/api.js +++ b/packages/gui/src/view/api.js @@ -1,5 +1,6 @@ import { ipcRenderer, shell } from 'electron' import lodash from 'lodash' +import path from 'node:path' let inited = false let apiObj = null @@ -31,7 +32,7 @@ export function apiInit (app) { await shell.openExternal(href) }, openPath (file) { - shell.openPath(file) + shell.openPath(path.resolve(file)) }, }, }