ludic.save save_write_tree: a tree straight to disk through Json.write_file, the backup and read-back kept; ludic.telemetry writes its id file the same way

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 15:42:59 +03:00
parent edb33400b3
commit 045ab0cdf6
4 changed files with 46 additions and 3 deletions

View file

@ -17,7 +17,8 @@ export function telemetry_set_id(telemetry_st: mut TelemetryState, id: string) -
var v = telemetry__read_obj(path)
if v == null { v = Value.object() }
Value.put(v, "id", Value.str(id))
Fs.write_text(path, Json.encode(v))
Json.write_file(v, path)
Json.free(v)
}
telemetry__fact(telemetry_st, TELEMETRY_ID, 0, 0, 0)
}