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 4bb295506e3a..6cefdb04e4c4 100644 --- a/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java +++ b/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistribution.java @@ -424,7 +424,7 @@ public class WSLDistribution { */ @ApiStatus.Experimental @NotNull - File getUNCRoot() { + public File getUNCRoot() { return new File(UNC_PREFIX + myDescriptor.getMsId()); } diff --git a/plugins/git4idea/src/git4idea/config/GitExecutable.kt b/plugins/git4idea/src/git4idea/config/GitExecutable.kt index 0d43f6f634be..407067643e99 100644 --- a/plugins/git4idea/src/git4idea/config/GitExecutable.kt +++ b/plugins/git4idea/src/git4idea/config/GitExecutable.kt @@ -66,8 +66,9 @@ sealed class GitExecutable { } override fun convertFilePathBack(path: String, workingDir: File): File { - val localPath = distribution.getWindowsPath(path) ?: path - return File(localPath) + val localPath = distribution.getWindowsPath(path) + if (localPath != null) return File(localPath) + return File(distribution.uncRoot, path) } override fun patchCommandLine(handler: GitHandler, commandLine: GeneralCommandLine, withLowPriority: Boolean, withNoTty: Boolean) {