From 9aba3bf6bdb6f3695c6f867f355cf6d0661be18f Mon Sep 17 00:00:00 2001 From: Alexandr Evstigneev Date: Mon, 23 Dec 2019 12:57:41 +0300 Subject: [PATCH] RUBY-25284 Review adjustments - Added LOG warning to clean up local cache - Used real mount directory instead of default one IDEA-CR-56841 GitOrigin-RevId: 5fac48abaa84e753bfd0b42c8b9d9570b9cf28bf --- .../com/intellij/execution/wsl/WSLDistribution.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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}