fix: resolve all double-nested home paths in cowork service (#373)

PR #374 fixed the 3 mountPath() methods but missed 4 other call sites
that also join os.homedir() with root-relative subpaths from app.asar.

This commit:
- Adds resolveSubpath() helper that handles both root-relative and
  home-relative subpaths correctly
- Fixes buildMountMap() doubled mount paths
- Fixes buildSpawnEnv() doubled CLAUDE_CONFIG_DIR (critical: this is
  where Claude Code stores conversation data; deleting ~/home/ after
  the incomplete fix crashed session resume)
- Fixes resolveWorkDir() doubled working directory
- Fixes resolveSdkBinary() doubled SDK binary path
- Upgrades the 3 mountPath() methods to use resolveSubpath() for
  consistency and correct handling of home-relative paths

Fixes #373
This commit is contained in:
RayCharlizard
2026-04-03 12:22:25 -05:00
parent 631e703d71
commit 9b3c8f4682

File diff suppressed because it is too large Load Diff