diff options
| author | CLHelper <359823989+CLHelper@users.noreply.github.com> | 2026-11-22 12:46:27 +0000 |
|---|---|---|
| committer | CLHelper <359823989+CLHelper@users.noreply.github.com> | 2026-11-22 12:50:28 +0000 |
| commit | 0f3e85c27a13561f8bd3858266cd477c4f1e209c (patch) | |
| tree | 50430ffc313bc37f41e6059df0e215761beb2522 /runtime/src/main.cpp | |
| parent | c2967a5e60060e4068fb992196d8f4b494a5046c (diff) | |
world_build: publish world.json through a private staging file
_write_json_atomic wrote world.json through a fixed "world.json.tmp": an
existing file of that name was overwritten and, when the write failed,
deleted; two builds into one output folder shared it; and its plain
os.replace had no retry for a Windows sharing violation, though the viewer
may hold world.json open during a rebuild.
It now stages through a NamedTemporaryFile in the same folder, as #425 did
for the GLB export, gives the result the mode of the file it replaces
(file_mode.published_mode), and _publish_world passes glb_writer._replace,
the retrying replace the chunks already go through.
tests/test_world_json_atomic.py: four tests fail on main (the sibling is
consumed on success and deleted on failure, two writes share a staging file,
world.json skips the retrying replace); the POSIX mode test runs on Linux.
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions