mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 18:39:33 +01:00
fix: keep a root=live listing inside the session folder (release review)
The lookup judges liveWorktree.path lexically and only when the pane moves, while the route's probe and readdir both follow symlinks. A symlink put at that path, or at a parent of it, without moving the pane re-rooted the listing outside workingDir. Names and sizes leaked, while file-content and file-raw still refused the paths. The route now resolves both folders on every request and walks the worktree only when it lies strictly inside the resolved workingDir, otherwise it walks workingDir. Only the check uses the resolved paths: the walk keeps the session's spelling, so a workspace reached through a symlink still gets paths relative to workingDir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89a93c871f
commit
5c1ec46b6f
5 files changed
+109
-12
No files matched your search
@@ -854,7 +854,8 @@ export interface SessionState {
|
||||
* the session's folder. Derived from {@link paneCwd} by `live-worktree.ts`, so it is
|
||||
* runtime-only and absent wherever `paneCwd` is, and absent for a worktree outside
|
||||
* `workingDir`: the file routes never serve those. NOT a confinement root; the Files panel
|
||||
* only starts its listing here.
|
||||
* only starts its listing here, after `GET .../files` has checked that the real folder still
|
||||
* lies inside `workingDir`, since a symlink can replace it without moving the pane.
|
||||
*/
|
||||
liveWorktree?: LiveWorktree;
|
||||
/** Remote execution metadata, present when this session runs over SSH through local tmux */
|
||||
|
||||
Reference in new issue
Block a user