diff options
| author | NWX10 <179748639+NWX10@users.noreply.github.com> | 2026-11-21 23:22:35 +0300 |
|---|---|---|
| committer | NWX10 <179748639+NWX10@users.noreply.github.com> | 2026-11-21 23:47:34 +0300 |
| commit | 71414bf0bf56dcf90ee130b27571394342d9d314 (patch) | |
| tree | e3b3097b22be3375cb0b31b2c7b0ea39e47cf812 /runtime/src/pe_loader.cpp | |
| parent | dcf5f44879ffa7cc1a1b61e284568b03c39d9885 (diff) | |
rpf9dump: write every output under a temporary name and rename it into place
make_game.py takes ttpf manifest.json and audio_manifest.json as proof that
a step finished, and every exporter skips a file that already exists. Both
were written in place, so a stopped run or a full disk could leave:
- a truncated manifest, after which make_game.py skips that texture pool
or the audio banks on every later run, or
- a truncated .dds / .obj / .xma.wav under its final name, kept forever
because the next run sees it exists.
All outputs (ttpf DDS + manifest, audio_manifest.json, XMA2 .xma.wav,
model .obj, embedded and dictionary .dds) now go through Util.WriteAtomic:
written to <path>.partial, then File.Move'd over the final name; the
temporary is removed on failure, and a stale one from a stopped run is
deleted first (WriteXmaWave opens its target with FileMode.CreateNew).
The models manifest already worked this way.
Util moves to its own file so tests/Rpf9DumpDiagnostics can link it; the
diagnostics program gains four checks for WriteAtomic.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions