fix: ENOENT: no such file or directory on MacOS

This commit is contained in:
ezequielnick 2025-09-08 17:27:43 +08:00
parent 23854a9666
commit 199ecd26dd
2 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,10 @@
- 修复 MacOS 进入轻量模式内核退出的问题
- 修复 AUR 发布问题
- 修复 改名后升级提示404的问题
- 遗失的部分翻译
- 改名后潜在的 MacOS 安装失败
- 改名后 WinGet 上传失败
- MacOS 首次启动时的 ENOENT: no such file or directory
### 优化 (Optimize)
- socket 管理防止内核通信失败

View File

@ -44,6 +44,8 @@ import { startSSIDCheck } from '../sys/ssid'
import i18next from '../../shared/i18n'
import { initLogger } from './logger'
let isInitBasicCompleted = false
// 安全错误处理
export function safeShowErrorBox(titleKey: string, message: string): void {
let title: string
@ -350,16 +352,21 @@ function initDeeplink(): void {
// 基础初始化
export async function initBasic(): Promise<void> {
if (isInitBasicCompleted) {
return
}
await initDirs()
await initConfig()
await migration()
await migrateSubStoreFiles()
await initFiles()
await cleanup()
isInitBasicCompleted = true
}
export async function init(): Promise<void> {
await initBasic()
await startSubStoreFrontendServer()
await startSubStoreBackendServer()
const { sysProxy } = await getAppConfig()