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:22:35 +0300 |
| commit | 65d927b61a88640d65317918923995aa39e1cd5f (patch) | |
| tree | c9dc23ff821b8dfc21e2f7c0787080bc554e120c /runtime/src/pe_loader.cpp | |
| parent | 4c75ce537add406b426d0a1dc84d9a01fb4c86c9 (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