From 1aec21b43ff35767c1143b17121b2e2679d293b0 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 5 Nov 2026 20:23:50 +0800 Subject: [PATCH] fix(gradle): launch linked builds with the platform's path separators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linked Gradle builds are saved with forward slashes, so on Windows the launcher of a build outside the project came out as `C:/…/external\gradlew.bat`. load_build now rebuilds the build folder from its components, giving the launcher and module folders native separators; the saved identity is unchanged. --- crates/ide-build/src/gradle.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ide-build/src/gradle.rs b/crates/ide-build/src/gradle.rs index 2cd996b1a..b4bc88396 100644 --- a/crates/ide-build/src/gradle.rs +++ b/crates/ide-build/src/gradle.rs @@ -440,7 +440,9 @@ pub fn load(root: &Path) -> Option { /// Loads exactly this build, without searching its child folders. pub fn load_build(root: &Path, dir: &Path) -> Option { - let dir = root.join(dir); + // Linked builds are saved with forward slashes; rebuild the path so the launcher + // and module folders use the platform's separators. + let dir: PathBuf = root.join(dir).components().collect(); if !SETTINGS_FILES.iter().chain(BUILD_FILES).any(|name| dir.join(name).is_file()) { return None; }