[PR #3218] [MERGED] launcher: quote server junction paths and show why mklink failed #4850

Closed
opened 2026-11-03 05:08:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3218
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix-server-junction


📝 Commits (1)

  • 9f1fa0a launcher: quote server junction paths and show why mklink failed

📊 Changes

2 files changed (+18 additions, -17 deletions)

View changed files

📝 launcher/src/servers.rs (+1 -11)
📝 launcher/src/sources.rs (+17 -6)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #3200: on Windows, creating a server in the launcher failed with a red "mklink /J failed" and no reason.

  • servers.rs point passed both paths to cmd /C mklink /J with .arg(), which quotes only paths with spaces. cmd reads &, ^ or ( in an unquoted path (a Windows user name can have them) as its own syntax. sources.rs already quoted them for the same reason.
  • Both now call one sources::junction. It always quotes, and on failure it puts cmd's stderr in the error ("Access is denied", "Cannot create a file when that file already exists"…). If the cause is something else, the next report will say what.

I couldn't reproduce this on Windows here: the Mac mini can't cross-check the Windows build (ring's C build), so CI's Windows build covers the cfg(windows) code. On the Mac: cargo fmt --check, clippy --all-targets -D warnings and cargo test in launcher/ pass (218 + 44 + 1).

crates/horizon-server/src/update.rs has the same unquoted mklink, for the dedicated server's own updates. I've left it for a separate PR.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3218 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix-server-junction` --- ### 📝 Commits (1) - [`9f1fa0a`](https://github.com/horizon-rust/horizon/commit/9f1fa0a0a213d59401f33bb511f039f234293402) launcher: quote server junction paths and show why mklink failed ### 📊 Changes **2 files changed** (+18 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/servers.rs` (+1 -11) 📝 `launcher/src/sources.rs` (+17 -6) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #3200: on Windows, creating a server in the launcher failed with a red "mklink /J failed" and no reason. - `servers.rs` `point` passed both paths to `cmd /C mklink /J` with `.arg()`, which quotes only paths with spaces. cmd reads `&`, `^` or `(` in an unquoted path (a Windows user name can have them) as its own syntax. `sources.rs` already quoted them for the same reason. - Both now call one `sources::junction`. It always quotes, and on failure it puts cmd's stderr in the error ("Access is denied", "Cannot create a file when that file already exists"…). If the cause is something else, the next report will say what. I couldn't reproduce this on Windows here: the Mac mini can't cross-check the Windows build (`ring`'s C build), so CI's Windows build covers the `cfg(windows)` code. On the Mac: `cargo fmt --check`, `clippy --all-targets -D warnings` and `cargo test` in `launcher/` pass (218 + 44 + 1). `crates/horizon-server/src/update.rs` has the same unquoted `mklink`, for the dedicated server's own updates. I've left it for a separate PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4850
No description provided.