fix(windows): canonicalize native watch paths
This commit is contained in:
@@ -18,9 +18,13 @@ Shared filesystem path helpers for DeepSeek Harness user data.
|
||||
|
||||
`expandHomePath()` expands `~`, `~/...`, and Windows-style `~\...` prefixes against the operating-system home directory. It leaves non-tilde paths and `~user/...` untouched.
|
||||
|
||||
## Watch paths
|
||||
|
||||
`canonicalizeWatchPath()` gives a native filesystem watcher one stable spelling of its target. It resolves the deepest existing ancestor through `fs.realpath()` and restores any missing suffix, so a file or directory may still be watched before it is created. In particular, Windows 8.3 aliases cannot be mixed with the long paths emitted by the native watcher backend.
|
||||
|
||||
This package is intentionally small and harness-dep-free so product packages can share user-data path conventions without depending on one another.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
- **Expansion is deliberately narrow** — only bare `~`, `~/...`, and `~\...` use the current operating-system home; named-user forms such as `~alice/...`, environment variables, and shell expressions remain unchanged.
|
||||
- **Helpers do not touch the filesystem** — callers still own directory creation, existence checks, permissions, and trust policy for the resulting path.
|
||||
- **Canonicalization reads but never mutates** — `canonicalizeWatchPath()` performs `realpath` probes and propagates errors other than absence; callers still own directory creation, permissions, and trust policy for the resulting path.
|
||||
|
||||
Reference in New Issue
Block a user