diff --git a/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java b/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java index f25af27e2697..f4ede6f67092 100644 --- a/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java +++ b/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java @@ -341,7 +341,7 @@ public class WSLDistribution { */ @Nullable public String getWindowsPath(@NotNull String wslPath) { - return WSLUtil.getWindowsPath(wslPath, myDescriptor.getMntRoot()); + return WSLUtil.getWindowsPath(wslPath, getMntRoot()); } /** @@ -350,11 +350,19 @@ public class WSLDistribution { @Nullable public String getWslPath(@NotNull String windowsPath) { if (FileUtil.isWindowsAbsolutePath(windowsPath)) { // absolute windows path => /mnt/disk_letter/path - return myDescriptor.getMntRoot() + convertWindowsPath(windowsPath); + return getMntRoot() + convertWindowsPath(windowsPath); } return null; } + /** + * @see WslDistributionDescriptor#getMntRoot() + */ + @NotNull + public final String getMntRoot(){ + return myDescriptor.getMntRoot(); + } + /** * @param windowsAbsolutePath properly formatted windows local absolute path: {@code drive:\path} * @return windows path converted to the linux path according to wsl rules: {@code c:\some\path} => {@code c/some/path}