Commit graph

2 commits

Author SHA1 Message Date
vrubelroman
98aaa09a2b fix(config): keep read-only configs; edit dotted and inline ui tables (QA-13, QA-14)
atomicfile.Write refuses a target the process cannot write (EACCES, as a
plain write in v0.2.7 did) instead of replacing it by rename. SetKey edits
a section written in the root table as dotted keys (ui.theme = ...) or as
a one-line inline table (ui = { theme = ... }), adding the key in the same
form when missing; multi-line inline tables are refused without touching
the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:10:05 +03:00
vrubelroman
1c57f92c42 feat(paths,atomicfile): XDG/sudo path rules and atomic local file writes (2C.1)
paths: config lookup -config → $VCOM_CONFIG → XDG → ~/.config (never the
working directory; StrayCwdConfig only reports one), state/cache/data dirs
of the effective user under sudo (inherited XDG_* ignored for writes),
run-<pid> dir with a sweep of dead processes' dirs (U-P1-15).
atomicfile: temp + fsync + rename + dir fsync; keeps the old file on any
error, writes through symlinks and keeps mode/owner of an existing file.
The trash now takes its home from paths.DataHome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:31:14 +03:00