mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-10 19:50:28 +08:00
fix: correct sidecar directory lookup path
This commit is contained in:
parent
52cefa39d3
commit
19ff003352
@ -46,10 +46,10 @@ function getBindingName() {
|
|||||||
function loadBinding() {
|
function loadBinding() {
|
||||||
const bindingName = getBindingName()
|
const bindingName = getBindingName()
|
||||||
|
|
||||||
// 查找项目根目录的 extra/sidecar
|
// 查找项目根目录的 sidecar
|
||||||
let currentDir = __dirname
|
let currentDir = __dirname
|
||||||
while (currentDir !== require('path').dirname(currentDir)) {
|
while (currentDir !== require('path').dirname(currentDir)) {
|
||||||
const sidecarPath = join(currentDir, 'extra', 'sidecar', bindingName)
|
const sidecarPath = join(currentDir, 'sidecar', bindingName)
|
||||||
if (existsSync(sidecarPath)) {
|
if (existsSync(sidecarPath)) {
|
||||||
try {
|
try {
|
||||||
nativeBinding = require(sidecarPath)
|
nativeBinding = require(sidecarPath)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user