From 0bdec8fbf515a9a5e436ed5a5439b9e09afc8bee Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Sat, 14 Apr 2012 20:24:23 +0200 Subject: [PATCH] Normalize UNC paths too --- .../openapi/vfs/impl/local/LocalFileSystemBase.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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, '/'); }