From e17197ea663c82dec93402afadc54abe1f26d4eb Mon Sep 17 00:00:00 2001 From: VirtualHotBar Date: Tue, 2 Jun 2026 02:16:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#80=20=E6=94=B9=E8=BF=9B=20Windows=2024H?= =?UTF-8?q?2=20=E6=8C=82=E8=BD=BD=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 检测 Windows 24H2 相关的挂载错误(access denied、unspecified error、I/O aborted) - 提供针对性的解决方案提示(更新 WinFsp、管理员运行、网络驱动器模式) - 检测资源不足错误(非分页缓冲区问题)并给出优化建议 --- src/repositories/mount/mountHelpers.ts | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/repositories/mount/mountHelpers.ts b/src/repositories/mount/mountHelpers.ts index 7a26168..a2e30f4 100644 --- a/src/repositories/mount/mountHelpers.ts +++ b/src/repositories/mount/mountHelpers.ts @@ -152,6 +152,24 @@ export async function performMount(mountInfo: MountListItem): Promise { // Windows 错误处理 if (rcloneInfo.version.os.toLowerCase().includes('windows')) { if (errorMsg.includes('winfsp') || errorMsg.includes('FUSE')) { + // 检测 Windows 24H2 相关的挂载问题 + const isWin24H2Issue = errorMsg.includes('access denied') || + errorMsg.includes('unspecified error') || + errorMsg.includes('I/O operation was aborted') || + errorMsg.includes('failed to retrieve mountpoint') + + if (isWin24H2Issue) { + throw new Error( + `Windows 挂载失败(可能是 Windows 24H2 兼容性问题)。\n` + + `请尝试以下解决方案:\n` + + `1. 确保已安装最新版 WinFsp(从 https://winfsp.dev/ 下载)\n` + + `2. 以管理员身份运行 NetMount\n` + + `3. 如果使用盘符挂载,尝试启用"网络驱动器"模式\n` + + `4. 如果问题持续,尝试挂载到目录路径而非盘符\n` + + `原始错误: ${errorMsg}` + ) + } + throw new Error( `Windows 挂载失败。请确保已安装 WinFsp:\n` + `1. 从 https://winfsp.dev/ 下载并安装 WinFsp\n` + @@ -159,6 +177,21 @@ export async function performMount(mountInfo: MountListItem): Promise { `原始错误: ${errorMsg}` ) } + + // 检测资源不足错误(非分页缓冲区问题) + if (errorMsg.includes('Insufficient system resources') || + errorMsg.includes('1450') || + errorMsg.includes('not enough resource')) { + throw new Error( + `Windows 挂载失败:系统资源不足。\n` + + `这可能是非分页缓冲区占用过高的问题。\n` + + `请尝试:\n` + + `1. 减少 ReadAhead 参数(建议 4MB 或更低)\n` + + `2. 重启系统以释放内存\n` + + `3. 检查是否有其他程序占用大量内存\n` + + `原始错误: ${errorMsg}` + ) + } } throw e