removed condition moved to FileUtil.isWindowsAbsolutePath (IDEA-CR-34321)

This commit is contained in:
Sergey Simonchik
2018-07-02 14:01:21 +03:00
parent c15f2f3148
commit ad2b0953e6
@@ -346,12 +346,6 @@ public class WSLDistribution {
@Nullable
public String getWslPath(@NotNull String windowsPath) {
if (FileUtil.isWindowsAbsolutePath(windowsPath)) { // absolute windows path => /mnt/disk_letter/path
if (windowsPath.length() > 2) {
char separator = windowsPath.charAt(2);
if (separator != '/' && separator != '\\') {
return null;
}
}
return WSL_MNT_ROOT +
Character.toLowerCase(windowsPath.charAt(0)) +
FileUtil.toSystemIndependentName(windowsPath.substring(2));