Merge pull request #1120 from feeldev12/fix/benchmark-world-folder-race

🤖 Agent: merged. Thank you @feeldev12! Verify passes. A 2-line fix to benchmark tooling: the world folder is created before the marker is written, so slow devices no longer race the async world open.
This commit is contained in:
Ludovic Marie
2026-10-22 02:03:17 +02:00
committed by GitHub
+2
View File
@@ -145,6 +145,8 @@ fn run(control: &Control, setup: Setup) -> Result<PathBuf, String> {
replace_world(&setup.game_dir)?;
control.call(&format!("open {WORLD} {SEED} creative"))?;
// The world opens on a worker: its folder may not exist yet when `open` replies.
std::fs::create_dir_all(setup.game_dir.join("saves").join(WORLD)).map_err(|e| e.to_string())?;
std::fs::write(
setup.game_dir.join("saves").join(WORLD).join(MARKER),
"Created by horizon-client --benchmark; replaced by the next run.\n",