diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java index 588c2682296d..99a195f8d3c5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java @@ -103,11 +103,10 @@ public abstract class LocalFileSystemBase extends LocalFileSystem { } if (SystemInfo.isWindows) { - if (path.startsWith("//") || path.startsWith("\\\\")) { - return path; + if (path.charAt(0) == '/' && !path.startsWith("//")) { + path = path.substring(1); // hack over new File(path).toUrl().getFile() } - if (path.charAt(0) == '/') path = path.substring(1); //hack over new File(path).toUrl().getFile() if (path.contains("~")) { try { return new File(path.replace('/', File.separatorChar)).getCanonicalPath().replace(File.separatorChar, '/'); @@ -123,7 +122,6 @@ public abstract class LocalFileSystemBase extends LocalFileSystem { } } - return path.replace(File.separatorChar, '/'); }