Summary
normalizeDiaryPath() uses path.resolve() on the raw configured path. path.resolve("~/dreams.md") resolves to <cwd>/~/dreams.md, not the user's home directory.
Impact
A natural Unix-style config value like dreamPromotionDiaryPath: "~/dreams.md" fails allowed-root validation with a confusing error.
Fix Path
PR #202 expands ~ to os.homedir() before resolving and applying allowed-root checks.
Verification Target
- Unit test for
~/... diary path expansion.
- Unit test proving allowed-root validation still rejects paths outside allowed roots after expansion.
– Vale
Summary
normalizeDiaryPath()usespath.resolve()on the raw configured path.path.resolve("~/dreams.md")resolves to<cwd>/~/dreams.md, not the user's home directory.Impact
A natural Unix-style config value like
dreamPromotionDiaryPath: "~/dreams.md"fails allowed-root validation with a confusing error.Fix Path
PR #202 expands
~toos.homedir()before resolving and applying allowed-root checks.Verification Target
~/...diary path expansion.– Vale