From b071154263f15a8018bc3c0654ae55fcf4b48170 Mon Sep 17 00:00:00 2001 From: xmk23333 Date: Thu, 15 Jan 2026 19:00:17 +0800 Subject: [PATCH] fix: improve sidecar path lookup for dev environment --- src/native/sysproxy/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/sysproxy/index.js b/src/native/sysproxy/index.js index 8d33c47..a372a49 100644 --- a/src/native/sysproxy/index.js +++ b/src/native/sysproxy/index.js @@ -48,10 +48,10 @@ function getResourcesPath() { if (process.resourcesPath) { return process.resourcesPath } - // 开发环境:从 __dirname 向上查找项目根目录 + // 开发环境:查找包含 extra/sidecar 的目录 let currentDir = __dirname while (currentDir !== dirname(currentDir)) { - if (existsSync(join(currentDir, 'package.json'))) { + if (existsSync(join(currentDir, 'extra', 'sidecar'))) { return currentDir } currentDir = dirname(currentDir)