mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 18:58:37 +00:00
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>