diff --git a/crates/ide-build/src/maven.rs b/crates/ide-build/src/maven.rs index 5336a7f901..7e16635599 100644 --- a/crates/ide-build/src/maven.rs +++ b/crates/ide-build/src/maven.rs @@ -1555,7 +1555,9 @@ pub fn load_with_linked_jdk( .as_deref() .or_else(|| managed.get(&d.key()).and_then(|m| m.system_path.as_deref()))?; let path = i(path); - (!path.contains("${") && Path::new(&path).is_absolute()).then(|| PathBuf::from(path)) + // Rebuilt from its components: `${pom.basedir}/lib/x.jar` on Windows mixes `\\` and `/`. + (!path.contains("${") && Path::new(&path).is_absolute()) + .then(|| Path::new(&path).components().collect::()) }) .collect();