diff options
| author | NWX10 <179748639+NWX10@users.noreply.github.com> | 2026-11-22 00:58:13 +0300 |
|---|---|---|
| committer | NWX10 <179748639+NWX10@users.noreply.github.com> | 2026-11-22 00:58:13 +0300 |
| commit | 690e6ee702c9f7fe575164937369e0a617d5bd36 (patch) | |
| tree | 39f57652e0b58ef84a67e70596052a733c2aba82 /runtime/src/tls_host.cpp | |
| parent | 3fae38a7a16ef1e9803349495598ff79510a8296 (diff) | |
manifest.py: report a damaged manifest instead of a traceback; create it atomically
verify read the manifest with json.load(...)["files"] and indexed each entry's "size" and "sha256" directly,
and main caught only OSError. A truncated or malformed manifest therefore ended in a JSONDecodeError, KeyError
or TypeError traceback. load_manifest now checks the JSON, the "files" table and every entry, and raises
ManifestError, which main reports as an ERROR line with exit 2 like a missing file.
create wrote the final manifest in place, so an interrupted run left exactly such a truncated file. It now
writes <out>.partial and swaps it in with os.replace, removing the partial file on any failure; the previous
manifest stays as it was.
The shipped game/xbox-1.0.2.1.json still loads (108 entries).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions