mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
Fix path remapping via wslpath (IDEA-CR-69177)
GitOrigin-RevId: 6540ceb1e77cd784e7ad0be462704fcdb66ec32e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7e556b8a57
commit
b5c75ebca9
@@ -50,7 +50,7 @@ public class JpsWslPathMapper implements JpsPathMapper {
|
||||
}
|
||||
if (path.indexOf(':') == 1) {
|
||||
int pathLengthAfterDriveLetter = path.length() - 2;
|
||||
myWslRootPrefix = wslPath.substring(0, wslPath.length() - pathLengthAfterDriveLetter - 2 /* slash and drive letter */);
|
||||
myWslRootPrefix = wslPath.substring(0, wslPath.length() - pathLengthAfterDriveLetter - 1);
|
||||
}
|
||||
return wslPath;
|
||||
}
|
||||
@@ -62,6 +62,6 @@ public class JpsWslPathMapper implements JpsPathMapper {
|
||||
ProcessBuilder processBuilder = new ProcessBuilder("/usr/bin/wslpath", path);
|
||||
Process process = processBuilder.start();
|
||||
process.waitFor();
|
||||
return StreamUtil.readText(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8));
|
||||
return StreamUtil.readText(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8)).trim();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user