From c6405610008b0c779ffe281a6cdab34c67f9199a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 25 Oct 2026 16:56:26 +0100 Subject: [PATCH] Launcher: the registry pack tests build file URLs with forward slashes, so they pass on Windows A Windows temp path's backslashes went into the test index's JSON as escapes, so the index failed to parse and the Windows launcher release stopped at its tests. Co-Authored-By: Claude Opus 5.5 --- launcher/src/browser/horizon/pack.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/launcher/src/browser/horizon/pack.rs b/launcher/src/browser/horizon/pack.rs index 73dcd0cc1..a2cc4d079 100644 --- a/launcher/src/browser/horizon/pack.rs +++ b/launcher/src/browser/horizon/pack.rs @@ -208,6 +208,8 @@ mod tests { zip.write_all(b"renderDistance:8\n").unwrap(); zip.finish().unwrap(); let size = |p: &Path| fs::metadata(p).unwrap().len(); + // Forward slashes: a Windows path's backslashes would be escapes in the JSON. + let url = |p: &Path| p.display().to_string().replace('\\', "/"); let text = format!( r#"{{"schema": 1, "projects": [ {{"id": "coords_hud", "kind": "mod", "name": "Coordinates HUD", "summary": "", "license": "MIT", @@ -219,9 +221,9 @@ mod tests { "requires": [{{"id": "coords_hud", "version": "0.1.0", "sha256": "{hmod_sha}"}}], "file": {{"name": "cozy-1.0.0.hpack", "url": "file://{}", "size": {}, "sha256": "{}"}}}}]}} ]{extra}}}"#, - hmod.display(), + url(&hmod), size(&hmod), - hpack.display(), + url(&hpack), size(&hpack), idx::sha256_file(&hpack).unwrap() );