Repository navigation
Sidebar preview fails with ENOENT when the workspace is on a non-system drive (0.2.0-rc.2) #9072
Replies: 2 comments
"路径被重基到
|
补充一组对照:alpha.5 上未能复现,但我的测试路径可能是你说的"能用"的那条我的环境比报告者新,先给出对照数据。 环境
比报告者的 现象在右侧栏打开一个确实存在的 对应 'error.notFound': '文件不存在,可能已被移动或删除',源码里这个文案由 case 'workspace-file/not-found': return t('error.notFound')而 const entry = await this.ctx.fs.lstat(path, { cwd: workspaceRoot }, signal)
if (entry === undefined) {
throw new RemoteError('workspace-file/not-found', `no entry at "${path}"`, { path })
}我做的对照(全部在 D 盘同一目录)
E / F / G 三份内容哈希完全相同(SHA-256 前 16 位 文件名逐字符核过:29 个字符 / 37 UTF-8 字节 / 全部是 我核过、没有问题的两处1. 地址编解码。 复现 2. 磁盘层面。 便携版 Node 对中文路径 关键限制:我可能没测到你那条路径我的测试文件是通过 present(交付卡片) 呈现的,不是通过右侧栏的文件树逐级点进去。而你在报告里写过:
所以我这 6 个"成功"很可能全部走的是"能用"的那条路,不构成对你那条路径的反证。 这一点必须先说清楚,免得被当成"alpha.5 已修复"。 另一个可能的解释G 是首次创建后立刻打开失败,E/F 是复制出来再打开成功。如果投递层按文件版本号( 想请报告者补的一条你原文的四个 discriminating experiments 里,A 是"文件不存在 + 相对路径",B/C/D 是"文件存在"。能不能补一条:文件存在 + 相对路径(不走交付卡片,纯右侧栏点开)? 如果 D(相对路径 + 存在)在你机器上也失败,那"交付路径丢失 workspace 基准"这个定位就更硬;如果 D 成功而 B/C 失败,问题就在绝对路径的重基,范围还能再窄一层。 我这边的结论
如果需要在右侧栏文件树里做逐级对照,我可以再测一轮并把每一步的 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
In the official desktop host
@deepseek-ai/dsh-desktop0.2.0-rc.2, opening an existing file inside the workspace through the sidebar fails when the workspace lives on a non-system drive. The delivered path loses its workspace base and is rebased ontoC:\.Environment
@deepseek-ai/dsh-desktop0.2.0-rc.2 (@deepseek-ai/dsh-desktop-runtime0.2.0-rc.2)D:\workspace(drive D:, non-system drive)Steps to reproduce
D:\workspace.D:\workspace\.archify\demo\demo.html.D:\workspace\.archify\demo\demo.htmlD:/workspace/.archify/demo/demo.html.archify\demo\demo.htmlObserved
{"ok":false,"error":{"code":"internal","message":"ENOENT: no such file or directory, stat 'C:\\.archify\\demo\\demo.html'"}}The target file exists and is readable (verified, ~742 KB), yet the delivered path is rebased onto
C:\.Discriminating experiments
"demo.html" does not exist (resolved to "D:\workspace\demo.html")— resolution is correctC:\.archify\...So path resolution is correct (A proves the base is the session workspace); the failure happens when the queued open is delivered — a different base is used at that point.
Code evidence
@deepseek-ai/dsh-api-workspace-files/lib/index.jsdocuments the rule:and resolves with:
When
cwd(the session workspace) is not carried along at delivery time, it falls back to the sandbox policy root — theC:\side here — so a workspace onD:can no longer bestat'ed. Suspected fault: the sidebar-open delivery does not carry/use the session workspace as an absolute base.Impact
Sidebar preview of workspace files (HTML / Markdown / images) is unavailable whenever the workspace is not on the same drive as the fallback root. Workarounds that do work: opening through the in-app deliverables card, or opening the file in an external browser. File contents and other features are unaffected.
Suggested fix
cwd.cwdfallback should be the workspace's own drive, not a fixedC:\.Version check (is it already fixed?)
Not fixed as far as I can obtain: the nightly feed reports the same version currently installed, so there is nothing newer to upgrade to.
https://download.deepseek.com/dsh-desk/feeds/win-x64/nightly.yml→versionreleaseDate: 2026-09-29T10:35:27.666Z)All reactions