edge-host: fix settings-backup terminator check (trailing newline) #121

Merged
k.renner merged 1 commits from fix/edge-zwave-settings-backup-newline into master 2026-07-07 09:52:54 +00:00
1 Commits
Author SHA1 Message Date
k.rennerandClaude Opus 4.8 f6f9d550bc edge-host: fix settings-backup terminator check (trailing newline)
The zwave-js settings backup guard in #120 checked `tail -c1 == "}"`, but
settings.json ends with "}\n" — so the last byte is a newline and the guard
always skipped ("not }-terminated"), producing no backup. Strip trailing
whitespace before the check so a valid, newline-terminated file is backed up
while a genuinely truncated one is still rejected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 11:39:07 +02:00