mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Normalize UNC paths too
This commit is contained in:
+2
-4
@@ -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, '/');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user