From c833fbe21243af0a0c8ee4f828fc27772507de24 Mon Sep 17 00:00:00 2001 From: feeldev Date: Wed, 21 Oct 2026 17:04:34 -0500 Subject: [PATCH] fix(benchmark): create the world folder before writing its marker `open` replies once the world starts opening on a worker, so the save folder may not exist yet when the benchmark writes horizon-benchmark.txt into it. On a slower device (an Android phone) the write failed with "No such file or directory" and the run ended before the first scene. --- crates/horizon-client/src/benchmark.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/horizon-client/src/benchmark.rs b/crates/horizon-client/src/benchmark.rs index 09989b8c9..483a68848 100644 --- a/crates/horizon-client/src/benchmark.rs +++ b/crates/horizon-client/src/benchmark.rs @@ -145,6 +145,8 @@ fn run(control: &Control, setup: Setup) -> Result { 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",